Package dev.gothickit.zenkit.way
Record Class CachedWayNet
java.lang.Object
java.lang.Record
dev.gothickit.zenkit.way.CachedWayNet
- All Implemented Interfaces:
CacheableObject<CachedWayNet>,WayNet
-
Constructor Summary
ConstructorsConstructorDescriptionCachedWayNet(@NotNull WayEdge @NotNull [] edges, @NotNull List<@NotNull WayPoint> points) Creates an instance of aCachedWayNetrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull CachedWayNetcache()@NotNull WayEdge @NotNull []edges()Returns the value of theedgesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanisCached()@Nullable WayPointpoint(long i) longpoints()Returns the value of thepointsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
pointCount
public long pointCount()- Specified by:
pointCountin interfaceWayNet
-
point
-
cache
- Specified by:
cachein interfaceCacheableObject<CachedWayNet>
-
isCached
public boolean isCached()- Specified by:
isCachedin interfaceCacheableObject<CachedWayNet>
-
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). -
edges
Returns the value of theedgesrecord component. -
points
Returns the value of thepointsrecord component.
-