org.onemind.commons.java.lang
Class MutableShort

java.lang.Object
  extended by java.lang.Number
      extended by org.onemind.commons.java.lang.MutableShort
All Implemented Interfaces:
java.io.Serializable

public class MutableShort
extends java.lang.Number

An mutable short

Version:
$Id: MutableShort.java,v 1.3 2004/09/03 13:24:14 thlee Exp $ $Name: $
Author:
TiongHiang Lee (thlee@onemindsoft.org)
See Also:
Serialized Form

Field Summary
private  short _value
          the long value *
 
Constructor Summary
MutableShort(short l)
          
 
Method Summary
 byte byteValue()
          
 void dec(short i)
          decrease by i
 double doubleValue()
          
 float floatValue()
          
 void inc(short i)
          increase by i
 int intValue()
          
 long longValue()
          
 void set(short l)
          Set the short value
 short shortValue()
          
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_value

private short _value
the long value *

Constructor Detail

MutableShort

public MutableShort(short l)

Parameters:
l - the long value
Method Detail

set

public final void set(short l)
Set the short value

Parameters:
l - the short value

byteValue

public final byte byteValue()

Overrides:
byteValue in class java.lang.Number

doubleValue

public final double doubleValue()

Specified by:
doubleValue in class java.lang.Number

floatValue

public final float floatValue()

Specified by:
floatValue in class java.lang.Number

intValue

public final int intValue()

Specified by:
intValue in class java.lang.Number

longValue

public final long longValue()

Specified by:
longValue in class java.lang.Number

shortValue

public final short shortValue()

Overrides:
shortValue in class java.lang.Number

inc

public void inc(short i)
increase by i

Parameters:
i - the value to increase

dec

public void dec(short i)
decrease by i

Parameters:
i - the value to decrease

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object