Record Class NetworkEndpoint
java.lang.Object
java.lang.Record
fr.robie.machineengine.api.network.NetworkEndpoint
- Record Components:
machine- the machine's (or container's) positionside- its face that touches the networkhandler- the port's resource handler (direction and filters already apply)container- a container block (e.g. a vanilla chest), not a machine: its changes wake no network, so networks pulling from it poll
public record NetworkEndpoint(@NotNull WorldPosition machine, @NotNull Direction side, @NotNull ResourceHandler handler, boolean container)
extends Record
A machine port, or a container block, touching a network.
-
Constructor Summary
ConstructorsConstructorDescriptionNetworkEndpoint(@NotNull WorldPosition machine, @NotNull Direction side, @NotNull ResourceHandler handler) NetworkEndpoint(@NotNull WorldPosition machine, @NotNull Direction side, @NotNull ResourceHandler handler, boolean container) Creates an instance of aNetworkEndpointrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of thecontainerrecord component.final booleanIndicates whether some other object is "equal to" this one.@NotNull ResourceHandlerhandler()Returns the value of thehandlerrecord component.final inthashCode()Returns a hash code value for this object.@NotNull WorldPositionmachine()Returns the value of themachinerecord component.@NotNull Directionside()Returns the value of thesiderecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
NetworkEndpoint
public NetworkEndpoint(@NotNull @NotNull WorldPosition machine, @NotNull @NotNull Direction side, @NotNull @NotNull ResourceHandler handler) -
NetworkEndpoint
public NetworkEndpoint(@NotNull @NotNull WorldPosition machine, @NotNull @NotNull Direction side, @NotNull @NotNull ResourceHandler handler, boolean container) Creates an instance of aNetworkEndpointrecord class.
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
machine
-
side
-
handler
-
container
-