Record Class VirtualBuilding<T>
java.lang.Object
java.lang.Record
com.xpdustry.nohorny.common.VirtualBuilding<T>
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionVirtualBuilding(int x, int y, int size, T data) Creates an instance of aVirtualBuildingrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondata()Returns the value of thedatarecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intpacked()intsize()Returns the value of thesizerecord component.final StringtoString()Returns a string representation of this record class.intx()Returns the value of thexrecord component.inty()Returns the value of theyrecord component.
-
Constructor Details
-
VirtualBuilding
Creates an instance of aVirtualBuildingrecord class.- Parameters:
x- the value for thexrecord componenty- the value for theyrecord componentsize- the value for thesizerecord componentdata- the value for thedatarecord component
-
-
Method Details
-
packed
public int packed() -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
x
public int x()Returns the value of thexrecord component.- Returns:
- the value of the
xrecord component
-
y
public int y()Returns the value of theyrecord component.- Returns:
- the value of the
yrecord component
-
size
public int size()Returns the value of thesizerecord component.- Returns:
- the value of the
sizerecord component
-
data
Returns the value of thedatarecord component.- Returns:
- the value of the
datarecord component
-