Record Class ChunkWrapper<T>
java.lang.Object
java.lang.Record
com.github.darksoulq.abyssallib.server.util.regional.ChunkWrapper<T>
- All Implemented Interfaces:
Locatable,WrappedLocatable<T>
public record ChunkWrapper<T>(@NotNull org.bukkit.Chunk chunk, T element)
extends Record
implements WrappedLocatable<T>
-
Constructor Summary
ConstructorsConstructorDescriptionChunkWrapper(@NotNull org.bukkit.Chunk chunk, T element) Creates an instance of aChunkWrapperrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull org.bukkit.Chunkchunk()Returns the value of thechunkrecord component.element()Returns the value of theelementrecord component.final booleanIndicates whether some other object is "equal to" this one.@NotNull org.bukkit.ChunkgetChunk()final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.Methods inherited from interface com.github.darksoulq.abyssallib.server.util.regional.Locatable
getLocation
-
Constructor Details
-
ChunkWrapper
Creates an instance of aChunkWrapperrecord class.- Parameters:
chunk- the value for thechunkrecord componentelement- the value for theelementrecord component
-
-
Method Details
-
getChunk
@NotNull public @NotNull org.bukkit.Chunk getChunk() -
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). -
chunk
@NotNull public @NotNull org.bukkit.Chunk chunk()Returns the value of thechunkrecord component.- Returns:
- the value of the
chunkrecord component
-
element
Returns the value of theelementrecord component.- Specified by:
elementin interfaceWrappedLocatable<T>- Returns:
- the value of the
elementrecord component
-