@Generated(value={"Immutables.generator","BoxType<S>"}) public final class Box<S> extends Object implements BoxType<S>
BoxType.
Use the builder to create immutable instances:
Box.<S>builder().
Use the static factory method to create immutable instances:
Box.<S>of().
| Modifier and Type | Class and Description |
|---|---|
static class |
Box.Builder<S>
Builds instances of type
Box. |
| Modifier and Type | Method and Description |
|---|---|
static <S> Box.Builder<S> |
builder()
Creates a builder for
Box. |
static <S> Box<S> |
copyOf(BoxType<S> instance)
Creates an immutable copy of a
BoxType value. |
boolean |
equals(Object another)
This instance is equal to all instances of
Box that have equal attribute values. |
int |
hashCode()
Computes a hash code from attributes:
minimumX, maximumX, minimumY, maximumY. |
int |
maximumX() |
int |
maximumY() |
int |
minimumX() |
int |
minimumY() |
static <S> Box<S> |
of(int minimumX,
int maximumX,
int minimumY,
int maximumY)
Construct a new immutable
Box instance. |
String |
toString()
Prints the immutable value
Box with attribute values. |
Box<S> |
withMaximumX(int maximumX)
Copy the current immutable object by setting a value for the
maximumX attribute. |
Box<S> |
withMaximumY(int maximumY)
Copy the current immutable object by setting a value for the
maximumY attribute. |
Box<S> |
withMinimumX(int minimumX)
Copy the current immutable object by setting a value for the
minimumX attribute. |
Box<S> |
withMinimumY(int minimumY)
Copy the current immutable object by setting a value for the
minimumY attribute. |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcheckPreconditions, height, widthpublic int minimumX()
public int maximumX()
public int minimumY()
public int maximumY()
public final Box<S> withMinimumX(int minimumX)
minimumX attribute.
A value equality check is used to prevent copying of the same value by returning this.minimumX - A new value for minimumXthis objectpublic final Box<S> withMaximumX(int maximumX)
maximumX attribute.
A value equality check is used to prevent copying of the same value by returning this.maximumX - A new value for maximumXthis objectpublic final Box<S> withMinimumY(int minimumY)
minimumY attribute.
A value equality check is used to prevent copying of the same value by returning this.minimumY - A new value for minimumYthis objectpublic final Box<S> withMaximumY(int maximumY)
maximumY attribute.
A value equality check is used to prevent copying of the same value by returning this.maximumY - A new value for maximumYthis objectpublic boolean equals(Object another)
Box that have equal attribute values.public int hashCode()
minimumX, maximumX, minimumY, maximumY.public String toString()
Box with attribute values.public static <S> Box<S> of(int minimumX, int maximumX, int minimumY, int maximumY)
Box instance.minimumX - The value for the minimumX attributemaximumX - The value for the maximumX attributeminimumY - The value for the minimumY attributemaximumY - The value for the maximumY attributepublic static <S> Box<S> copyOf(BoxType<S> instance)
BoxType value.
Uses accessors to get values to initialize the new immutable instance.
If an instance is already immutable, it is returned as is.S - generic parameter Sinstance - The instance to copypublic static <S> Box.Builder<S> builder()
Box.S - generic parameter SCopyright © 2016 <code@io7m.com> http://io7m.com