Record Class CableConnections
java.lang.Object
java.lang.Record
com.refinedmods.refinedstorage.common.networking.CableConnections
public record CableConnections(boolean north, boolean east, boolean south, boolean west, boolean up, boolean down)
extends Record
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCableConnections
(boolean north, boolean east, boolean south, boolean west, boolean up, boolean down) Creates an instance of aCableConnections
record class. -
Method Summary
Modifier and TypeMethodDescriptionboolean
down()
Returns the value of thedown
record component.boolean
east()
Returns the value of theeast
record component.final boolean
Indicates whether some other object is "equal to" this one.static CableConnections
fromTag
(net.minecraft.nbt.CompoundTag tag) final int
hashCode()
Returns a hash code value for this object.boolean
north()
Returns the value of thenorth
record component.boolean
south()
Returns the value of thesouth
record component.static void
stripTag
(net.minecraft.nbt.CompoundTag tag) final String
toString()
Returns a string representation of this record class.boolean
up()
Returns the value of theup
record component.boolean
west()
Returns the value of thewest
record component.net.minecraft.nbt.CompoundTag
writeToTag
(net.minecraft.nbt.CompoundTag tag)
-
Field Details
-
NONE
-
-
Constructor Details
-
CableConnections
public CableConnections(boolean north, boolean east, boolean south, boolean west, boolean up, boolean down) Creates an instance of aCableConnections
record class.- Parameters:
north
- the value for thenorth
record componenteast
- the value for theeast
record componentsouth
- the value for thesouth
record componentwest
- the value for thewest
record componentup
- the value for theup
record componentdown
- the value for thedown
record component
-
-
Method Details
-
fromTag
-
writeToTag
public net.minecraft.nbt.CompoundTag writeToTag(net.minecraft.nbt.CompoundTag tag) -
stripTag
public static void stripTag(net.minecraft.nbt.CompoundTag tag) -
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. All components in this record class are compared with '=='. -
north
public boolean north()Returns the value of thenorth
record component.- Returns:
- the value of the
north
record component
-
east
public boolean east()Returns the value of theeast
record component.- Returns:
- the value of the
east
record component
-
south
public boolean south()Returns the value of thesouth
record component.- Returns:
- the value of the
south
record component
-
west
public boolean west()Returns the value of thewest
record component.- Returns:
- the value of the
west
record component
-
up
public boolean up()Returns the value of theup
record component.- Returns:
- the value of the
up
record component
-
down
public boolean down()Returns the value of thedown
record component.- Returns:
- the value of the
down
record component
-