Record Class LocationWrapper<T>
java.lang.Object
java.lang.Record
com.github.darksoulq.abyssallib.server.util.regional.LocationWrapper<T>
- All Implemented Interfaces:
Locatable, WrappedLocatable<T>
public record LocationWrapper<T>(@NotNull org.bukkit.Location location, T element)
extends Record
implements WrappedLocatable<T>
-
Constructor Summary
ConstructorsConstructorDescriptionLocationWrapper(@NotNull org.bukkit.Location location, T element) Creates an instance of aLocationWrapperrecord class. -
Method Summary
Modifier and TypeMethodDescriptionelement()Returns the value of theelementrecord component.final booleanIndicates whether some other object is "equal to" this one.@NotNull org.bukkit.Locationfinal inthashCode()Returns a hash code value for this object.@NotNull org.bukkit.Locationlocation()Returns the value of thelocationrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
LocationWrapper
Creates an instance of aLocationWrapperrecord class.- Parameters:
location- the value for thelocationrecord componentelement- the value for theelementrecord component
-
-
Method Details
-
getLocation
@NotNull public @NotNull org.bukkit.Location getLocation()- Specified by:
getLocationin interfaceLocatable
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
location
@NotNull public @NotNull org.bukkit.Location location()Returns the value of thelocationrecord component.- Returns:
- the value of the
locationrecord component
-
element
Returns the value of theelementrecord component.- Specified by:
elementin interfaceWrappedLocatable<T>- Returns:
- the value of the
elementrecord component
-