Package dev.gothickit.zenkit.way
Record Class CachedWayPoint
java.lang.Object
java.lang.Record
dev.gothickit.zenkit.way.CachedWayPoint
- All Implemented Interfaces:
CacheableObject<CachedWayPoint>,WayPoint
-
Constructor Summary
ConstructorsConstructorDescriptionCachedWayPoint(@NotNull String name, int waterDepth, boolean underWater, @NotNull Vec3f position, @NotNull Vec3f direction, boolean freePoint) Creates an instance of aCachedWayPointrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull CachedWayPointcache()@NotNull Vec3fReturns the value of thedirectionrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of thefreePointrecord component.final inthashCode()Returns a hash code value for this object.booleanisCached()@NotNull Stringname()Returns the value of thenamerecord component.@NotNull Vec3fposition()Returns the value of thepositionrecord component.final StringtoString()Returns a string representation of this record class.booleanReturns the value of theunderWaterrecord component.intReturns the value of thewaterDepthrecord component.
-
Constructor Details
-
CachedWayPoint
public CachedWayPoint(@NotNull @NotNull String name, int waterDepth, boolean underWater, @NotNull @NotNull Vec3f position, @NotNull @NotNull Vec3f direction, boolean freePoint) Creates an instance of aCachedWayPointrecord class.- Parameters:
name- the value for thenamerecord componentwaterDepth- the value for thewaterDepthrecord componentunderWater- the value for theunderWaterrecord componentposition- the value for thepositionrecord componentdirection- the value for thedirectionrecord componentfreePoint- the value for thefreePointrecord component
-
-
Method Details
-
cache
- Specified by:
cachein interfaceCacheableObject<CachedWayPoint>
-
isCached
public boolean isCached()- Specified by:
isCachedin interfaceCacheableObject<CachedWayPoint>
-
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 '=='. -
name
Returns the value of thenamerecord component. -
waterDepth
public int waterDepth()Returns the value of thewaterDepthrecord component.- Specified by:
waterDepthin interfaceWayPoint- Returns:
- the value of the
waterDepthrecord component
-
underWater
public boolean underWater()Returns the value of theunderWaterrecord component.- Specified by:
underWaterin interfaceWayPoint- Returns:
- the value of the
underWaterrecord component
-
position
Returns the value of thepositionrecord component. -
direction
Returns the value of thedirectionrecord component. -
freePoint
public boolean freePoint()Returns the value of thefreePointrecord component.
-