Package io.openems.edge.bridge.http.api
Record Class BridgeHttpCycle.CycleEndpoint
java.lang.Object
java.lang.Record
io.openems.edge.bridge.http.api.BridgeHttpCycle.CycleEndpoint
- Enclosing interface:
BridgeHttpCycle
-
Constructor Summary
ConstructorDescriptionCycleEndpoint
(int cycle, BridgeHttp.Endpoint endpoint, Consumer<String> result, Consumer<Throwable> onError) Creates an instance of aCycleEndpoint
record class. -
Method Summary
Modifier and TypeMethodDescriptionint
cycle()
Returns the value of thecycle
record component.endpoint()
Returns the value of theendpoint
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.onError()
Returns the value of theonError
record component.result()
Returns the value of theresult
record component.toString()
Returns a string representation of this record class.
-
Constructor Details
-
CycleEndpoint
public CycleEndpoint(int cycle, BridgeHttp.Endpoint endpoint, Consumer<String> result, Consumer<Throwable> onError) Creates an instance of aCycleEndpoint
record class.- Parameters:
cycle
- the value for thecycle
record componentendpoint
- the value for theendpoint
record componentresult
- the value for theresult
record componentonError
- the value for theonError
record component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
cycle
public int cycle()Returns the value of thecycle
record component.- Returns:
- the value of the
cycle
record component
-
endpoint
Returns the value of theendpoint
record component.- Returns:
- the value of the
endpoint
record component
-
result
Returns the value of theresult
record component.- Returns:
- the value of the
result
record component
-
onError
Returns the value of theonError
record component.- Returns:
- the value of the
onError
record component
-