com.ds.fw.types
Class FwInteger

java.lang.Object
  |
  +--com.ds.fw.types.FwSimpleObject
        |
        +--com.ds.fw.types.FwInteger
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable, FwCopyableIF, FwDisplayableIF, FwIntegerIF, FwSimpleObjectIF, java.io.Serializable

public class FwInteger
extends FwSimpleObject
implements FwIntegerIF

See Also:
Serialized Form

Field Summary
 int _value
           
 
Constructor Summary
FwInteger()
           
FwInteger(int i)
           
 
Method Summary
 void add(int i)
          Adds some value to the field _value
 int compareTo(java.lang.Object e)
          Compares this FwInteger to the specified object
 boolean equals(java.lang.Object e)
          Compares this FwInteger to the specified object
 int getValue()
          Gets the value of the field _value
 int hashCode()
          The same as getValue()
 com.ds.fw.types.FwIntegerIF max(com.ds.fw.types.FwIntegerIF i)
          Return the greater of two FwInteger (compared by their field _value)
 com.ds.fw.types.FwIntegerIF min(com.ds.fw.types.FwIntegerIF i)
          Return the less of two FwInteger (compared by their field _value)
 void setValue(int o)
          Sets the value of the field _value
 void subtract(int i)
          Substracts a value from the field _value
 java.lang.String toStringValue()
          Returns the string representation of this FwInteger object
 
Methods inherited from class com.ds.fw.types.FwSimpleObject
getClassName, getClone, getCopy, getCopy, getDeepCopy, getDisplayString, getDisplayStringFor, postCopy, printStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.ds.fw.types.FwSimpleObjectIF
getClassName, getClone, getCopy, getCopy, getDeepCopy, getDisplayString, getDisplayStringFor, postCopy, toString
 

Field Detail

_value

public int _value
Constructor Detail

FwInteger

public FwInteger()

FwInteger

public FwInteger(int i)
Method Detail

getValue

public int getValue()
Gets the value of the field _value

Specified by:
getValue in interface FwIntegerIF
Returns:
the value of the field _value

setValue

public void setValue(int o)
Sets the value of the field _value

Specified by:
setValue in interface FwIntegerIF
Parameters:
o - - the new value

add

public void add(int i)
Adds some value to the field _value

Specified by:
add in interface FwIntegerIF
Parameters:
i - - the value to be added

subtract

public void subtract(int i)
Substracts a value from the field _value

Specified by:
subtract in interface FwIntegerIF
Parameters:
i - - the value to be substracted

equals

public boolean equals(java.lang.Object e)
Compares this FwInteger to the specified object

Overrides:
equals in class java.lang.Object
Parameters:
e - the object to compare this FwInteger against.
Returns:
true if they are equals

compareTo

public int compareTo(java.lang.Object e)
Compares this FwInteger to the specified object

Specified by:
compareTo in interface java.lang.Comparable
Parameters:
e - the object to compare this FwInteger against.
Returns:
-1 if the value of this FwInteger is less than this of the parameter 1 if the value of this FwInteger is greater , and 0 - otherwise

hashCode

public int hashCode()
The same as getValue()

Overrides:
hashCode in class java.lang.Object
Returns:
the value of the field _value
See Also:
getValue()

max

public com.ds.fw.types.FwIntegerIF max(com.ds.fw.types.FwIntegerIF i)
Return the greater of two FwInteger (compared by their field _value)

Specified by:
max in interface FwIntegerIF
Parameters:
i -
Returns:
the greater

min

public com.ds.fw.types.FwIntegerIF min(com.ds.fw.types.FwIntegerIF i)
Return the less of two FwInteger (compared by their field _value)

Specified by:
min in interface FwIntegerIF
Parameters:
i -
Returns:
the less

toStringValue

public java.lang.String toStringValue()
Returns the string representation of this FwInteger object

Specified by:
toStringValue in interface FwSimpleObjectIF
Overrides:
toStringValue in class FwSimpleObject
Returns:
the string representation of this FwInteger