Class AreaXYSplitF<T extends AreaFType>
java.lang.Object
com.io7m.jregions.core.unparameterized.areas.AreaXYSplitF<T>
- Type Parameters:
T- The precise type of area
- All Implemented Interfaces:
AreaXYSplitFType<T>
An area that has been split into quadrants via an X and Y axis.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classAreaXYSplitF.Builder<T extends AreaFType>Builds instances of typeAreaXYSplitF. -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends AreaFType>
AreaXYSplitF.Builder<T>builder()Creates a builder forAreaXYSplitF.static <T extends AreaFType>
AreaXYSplitF<T>copyOf(AreaXYSplitFType<T> instance) Creates an immutable copy of aAreaXYSplitFTypevalue.booleanThis instance is equal to all instances ofAreaXYSplitFthat have equal attribute values.inthashCode()Computes a hash code from attributes:x0y0,x1y0,x0y1,x1y1.static <T extends AreaFType>
AreaXYSplitF<T>of(T x0y0, T x1y0, T x0y1, T x1y1) Construct a new immutableAreaXYSplitFinstance.toString()Prints the immutable valueAreaXYSplitFwith attribute values.final AreaXYSplitF<T>Copy the current immutable object by setting a value for thex0y0attribute.final AreaXYSplitF<T>Copy the current immutable object by setting a value for thex0y1attribute.final AreaXYSplitF<T>Copy the current immutable object by setting a value for thex1y0attribute.final AreaXYSplitF<T>Copy the current immutable object by setting a value for thex1y1attribute.x0y0()x0y1()x1y0()x1y1()
-
Method Details
-
x0y0
- Specified by:
x0y0in interfaceAreaXYSplitFType<T extends AreaFType>- Returns:
- The minimum X, minimum Y quadrant
-
x1y0
- Specified by:
x1y0in interfaceAreaXYSplitFType<T extends AreaFType>- Returns:
- The maximum X, minimum Y quadrant
-
x0y1
- Specified by:
x0y1in interfaceAreaXYSplitFType<T extends AreaFType>- Returns:
- The minimum X, maximum Y quadrant
-
x1y1
- Specified by:
x1y1in interfaceAreaXYSplitFType<T extends AreaFType>- Returns:
- The maximum X, maximum Y quadrant
-
withX0y0
Copy the current immutable object by setting a value for thex0y0attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for x0y0- Returns:
- A modified copy of the
thisobject
-
withX1y0
Copy the current immutable object by setting a value for thex1y0attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for x1y0- Returns:
- A modified copy of the
thisobject
-
withX0y1
Copy the current immutable object by setting a value for thex0y1attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for x0y1- Returns:
- A modified copy of the
thisobject
-
withX1y1
Copy the current immutable object by setting a value for thex1y1attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for x1y1- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofAreaXYSplitFthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:x0y0,x1y0,x0y1,x1y1. -
toString
Prints the immutable valueAreaXYSplitFwith attribute values. -
of
Construct a new immutableAreaXYSplitFinstance.- Type Parameters:
T- generic parameter T- Parameters:
x0y0- The value for thex0y0attributex1y0- The value for thex1y0attributex0y1- The value for thex0y1attributex1y1- The value for thex1y1attribute- Returns:
- An immutable AreaXYSplitF instance
-
copyOf
Creates an immutable copy of aAreaXYSplitFTypevalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Type Parameters:
T- generic parameter T- Parameters:
instance- The instance to copy- Returns:
- A copied immutable AreaXYSplitF instance
-
builder
Creates a builder forAreaXYSplitF.AreaXYSplitF.<T>builder() .setX0y0(T) // requiredx0y0.setX1y0(T) // requiredx1y0.setX0y1(T) // requiredx0y1.setX1y1(T) // requiredx1y1.build();- Type Parameters:
T- generic parameter T- Returns:
- A new AreaXYSplitF builder
-