| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public final Dimension | |
| public Object | |
| public Object | cloneMutable()
Implements com. |
| public int | compareTo(final DimensionImmutable
the object to be compared. d)Implements com. Compares square of size. |
| public boolean | equals(final Object
the reference object with which to compare. obj)Overrides java. Implements com. |
| public final int | |
| public final int | |
| public int | hashCode()
Overrides java. Implements com. |
| public final Dimension | |
| public final void | |
| public final void | |
| public final void | |
| public String |
| Dimension | back to summary |
|---|---|
| public Dimension() | |
| Dimension | back to summary |
|---|---|
| public Dimension(final int[] size) | |
| Dimension | back to summary |
|---|---|
| public Dimension(final int width, final int height) | |
| add | back to summary |
|---|---|
| public final Dimension add(final Dimension pd) | |
| clone | back to summary |
|---|---|
| public Object clone() Overrides java. Doc from java. Creates and returns a copy of this object. The precise meaning
of "copy" may depend on the class of the object. The general
intent is that, for any object will be true, and that the expression:x.clone() != x will bex.clone().getClass() == x.getClass() true, but these are not absolute requirements.
While it is typically the case that:
will bex.clone().equals(x) true, this is not an absolute requirement.
By convention, the returned object should be obtained by calling
By convention, the object returned by this method should be independent
of this object (which is being cloned). To achieve this independence,
it may be necessary to modify one or more fields of the object returned
by | |
| cloneMutable | back to summary |
|---|---|
| public Object cloneMutable() Implements com. Doc from com. Get a mutable clone from this instance.
| |
| compareTo | back to summary |
|---|---|
| public int compareTo(final DimensionImmutable d) Implements com. Doc from com. Compares square of size. Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.The implementor must ensure The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that
| |
| equals | back to summary |
|---|---|
| public boolean equals(final Object obj) Overrides java. Implements com. Doc from com. Checks whether two dimensions objects are equal. Two instances
of
| |
| getHeight | back to summary |
|---|---|
| public final int getHeight() Implements com.
| |
| getWidth | back to summary |
|---|---|
| public final int getWidth() Implements com.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Implements com. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| scale | back to summary |
|---|---|
| public final Dimension scale(final int s) | |
| set | back to summary |
|---|---|
| public final void set(final int width, final int height) | |
| setHeight | back to summary |
|---|---|
| public final void setHeight(final int height) | |
| setWidth | back to summary |
|---|---|
| public final void setWidth(final int width) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |