Record Class FluidState
java.lang.Object
java.lang.Record
fr.fidorial.world.fluid.FluidState
-
Constructor Summary
ConstructorsConstructorDescriptionFluidState(@Nullable FluidType type, int level, boolean falling) Creates an instance of aFluidStaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionintstatic FluidStateempty()final booleanIndicates whether some other object is "equal to" this one.booleanfalling()Returns the value of thefallingrecord component.static FluidStatefallingFluid(FluidType type) static FluidStatefinal inthashCode()Returns a hash code value for this object.booleanisEmpty()booleanisSource()intlevel()Returns the value of thelevelrecord component.static FluidStatefinal StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
FluidState
-
-
Method Details
-
empty
-
source
-
flowing
-
fallingFluid
-
isEmpty
public boolean isEmpty() -
isSource
public boolean isSource() -
effectiveLevel
public int effectiveLevel() -
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. -
type
-
level
public int level()Returns the value of thelevelrecord component.- Returns:
- the value of the
levelrecord component
-
falling
public boolean falling()Returns the value of thefallingrecord component.- Returns:
- the value of the
fallingrecord component
-