Record Class VirtualBuilding.Group<T>
java.lang.Object
java.lang.Record
com.xpdustry.nohorny.common.VirtualBuilding.Group<T>
- Enclosing class:
VirtualBuilding<T>
public static record VirtualBuilding.Group<T>(int x, int y, int w, int h, Collection<VirtualBuilding<T>> elements)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionGroup(int x, int y, int w, int h, Collection<VirtualBuilding<T>> elements) Creates an instance of aGrouprecord class. -
Method Summary
Modifier and TypeMethodDescriptionelements()Returns the value of theelementsrecord component.final booleanIndicates whether some other object is "equal to" this one.inth()Returns the value of thehrecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.intw()Returns the value of thewrecord component.intx()Returns the value of thexrecord component.inty()Returns the value of theyrecord component.
-
Constructor Details
-
Group
Creates an instance of aGrouprecord class.- Parameters:
x- the value for thexrecord componenty- the value for theyrecord componentw- the value for thewrecord componenth- the value for thehrecord componentelements- the value for theelementsrecord component
-
-
Method Details
-
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
-
w
public int w()Returns the value of thewrecord component.- Returns:
- the value of the
wrecord component
-
h
public int h()Returns the value of thehrecord component.- Returns:
- the value of the
hrecord component
-
elements
Returns the value of theelementsrecord component.- Returns:
- the value of the
elementsrecord component
-