org.openfast.template
Class LongValue

java.lang.Object
  extended by org.openfast.ScalarValue
      extended by org.openfast.NumericValue
          extended by org.openfast.template.LongValue
All Implemented Interfaces:
java.io.Serializable, FieldValue

public class LongValue
extends NumericValue

See Also:
Serialized Form

Field Summary
 long value
           
 
Fields inherited from class org.openfast.ScalarValue
NULL, UNDEFINED
 
Constructor Summary
LongValue(long value)
          LongValue Constructor
 
Method Summary
 NumericValue add(NumericValue addend)
          Adds two Numeric Values values and creates a new LongValue with the new value
 NumericValue decrement()
          Decrement 'value' and create a new LongValue with the new value
 boolean equals(int value)
          Finds if the passed value is the same as the Value of LongValue
 boolean equals(java.lang.Object obj)
          Compares a LongValue object with another LongValue object
 boolean equalsValue(java.lang.String defaultValue)
          Compares a string that is converted to an integer to the value of LogValue
 int hashCode()
           
 NumericValue increment()
          Increment 'value' and create a new LongValue with the new value
 java.lang.String serialize()
           
 NumericValue subtract(NumericValue subend)
          Subtracts two NumericValues values and creates a new LongValue with the new value
 int toInt()
           
 long toLong()
           
 java.lang.String toString()
           
 
Methods inherited from class org.openfast.ScalarValue
copy, getBytes, isNull, isUndefined, toBigDecimal, toByte, toDouble, toShort
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

value

public final long value
Constructor Detail

LongValue

public LongValue(long value)
LongValue Constructor

Parameters:
value - The value of the LongValue as type long
Method Detail

equals

public boolean equals(java.lang.Object obj)
Compares a LongValue object with another LongValue object

Overrides:
equals in class java.lang.Object
Parameters:
obj - the object to compare to
Returns:
True if the two objects are the same, false otherwise

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equalsValue

public boolean equalsValue(java.lang.String defaultValue)
Compares a string that is converted to an integer to the value of LogValue

Overrides:
equalsValue in class ScalarValue
Parameters:
defaultValue - The string to be convereted to an integer and compared
Returns:
Returns true if the string and the value are equal, false otherwise

increment

public NumericValue increment()
Increment 'value' and create a new LongValue with the new value

Specified by:
increment in class NumericValue
Returns:
Returns a new LongValue with the value that is one more then before

decrement

public NumericValue decrement()
Decrement 'value' and create a new LongValue with the new value

Specified by:
decrement in class NumericValue
Returns:
Returns a new LongValue with the value that is one less then before

toString

public java.lang.String toString()
Overrides:
toString in class ScalarValue
Returns:
Returns a string of the value of LongValue

subtract

public NumericValue subtract(NumericValue subend)
Subtracts two NumericValues values and creates a new LongValue with the new value

Specified by:
subtract in class NumericValue
Parameters:
subend - The NumericValue to be subtracted
Returns:
Returns a new LongValue with the value as the difference between the two NumericValues

add

public NumericValue add(NumericValue addend)
Adds two Numeric Values values and creates a new LongValue with the new value

Specified by:
add in class NumericValue
Parameters:
addend - The NumericValue to be added
Returns:
Returns a new LongValue with the value as he addition between the two NumericValues

serialize

public java.lang.String serialize()
Returns:
Returns the value of LongValue as a string

equals

public boolean equals(int value)
Finds if the passed value is the same as the Value of LongValue

Specified by:
equals in class NumericValue
Parameters:
value - The integer to be compared
Returns:
Returns true if the integer value passd is the same as the value of LongValue

toLong

public long toLong()
Specified by:
toLong in class NumericValue
Returns:
Returns the value of LongValue as a long

toInt

public int toInt()
Specified by:
toInt in class NumericValue
Returns:
Returns the value of LongValue as an integer


Copyright © 2006-2008 The LaSalle Technology Group, LLC. All Rights Reserved.