Package dev.latvian.mods.klib.util
Record Class IntOrUUID.UUIDImpl
java.lang.Object
java.lang.Record
dev.latvian.mods.klib.util.IntOrUUID.UUIDImpl
- All Implemented Interfaces:
IntOrUUID
- Enclosing interface:
IntOrUUID
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.latvian.mods.klib.util.IntOrUUID
IntOrUUID.IntImpl, IntOrUUID.UUIDImpl -
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioneither()final booleanIndicates whether some other object is "equal to" this one.@Nullable net.minecraft.world.entity.EntitygetEntity(net.minecraft.world.level.Level level) final inthashCode()Returns a hash code value for this object.Returns the value of theoptionalValuerecord component.booleantestEntity(net.minecraft.world.entity.Entity entity) @NotNull StringtoString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.
-
Constructor Details
-
UUIDImpl
-
UUIDImpl
Creates an instance of aUUIDImplrecord class.- Parameters:
value- the value for thevaluerecord componentoptionalValue- the value for theoptionalValuerecord component
-
-
Method Details
-
either
-
optionalInt
- Specified by:
optionalIntin interfaceIntOrUUID
-
optionalUUID
- Specified by:
optionalUUIDin interfaceIntOrUUID
-
testEntity
public boolean testEntity(net.minecraft.world.entity.Entity entity) - Specified by:
testEntityin interfaceIntOrUUID
-
getEntity
@Nullable public @Nullable net.minecraft.world.entity.Entity getEntity(net.minecraft.world.level.Level level) -
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 withObjects::equals(Object,Object). -
value
Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-
optionalValue
Returns the value of theoptionalValuerecord component.- Returns:
- the value of the
optionalValuerecord component
-