public final class MutableShort extends java.lang.Number implements java.lang.Comparable<MutableShort>, java.lang.Cloneable
short wrapper.| Modifier and Type | Field and Description |
|---|---|
short |
value
The mutable value.
|
| Constructor and Description |
|---|
MutableShort() |
MutableShort(java.lang.Number number) |
MutableShort(short value) |
MutableShort(java.lang.String value) |
| Modifier and Type | Method and Description |
|---|---|
MutableShort |
clone()
Clones object.
|
int |
compareTo(MutableShort other)
Compares value of two same instances.
|
double |
doubleValue()
Returns the value as a double.
|
boolean |
equals(java.lang.Object obj)
Compares this object to the specified object.
|
float |
floatValue()
Returns the value as a float.
|
short |
get()
Returns mutable value.
|
int |
hashCode()
Returns a hashcode for this value.
|
int |
intValue()
Returns the value as a int.
|
long |
longValue()
Returns the value as a long.
|
static MutableShort |
of(short value) |
void |
set(java.lang.Number value)
Sets mutable value from a Number.
|
void |
set(short value)
Sets mutable value.
|
java.lang.String |
toString()
Stringify the value.
|
public MutableShort()
public MutableShort(short value)
public MutableShort(java.lang.String value)
public MutableShort(java.lang.Number number)
public static MutableShort of(short value)
public short get()
public void set(short value)
public void set(java.lang.Number value)
public java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the object to compare with.true if the objects are the same;
false otherwise.public int intValue()
intValue in class java.lang.Numberpublic long longValue()
longValue in class java.lang.Numberpublic float floatValue()
floatValue in class java.lang.Numberpublic double doubleValue()
doubleValue in class java.lang.Numberpublic int compareTo(MutableShort other)
compareTo in interface java.lang.Comparable<MutableShort>public MutableShort clone()
clone in class java.lang.ObjectCopyright © 2003-present Jodd Team