net.lucidviews.util
Class VariableLong

java.lang.Object
  extended by java.lang.Number
      extended by net.lucidviews.util.VariableNumber
          extended by net.lucidviews.util.VariableLong
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
Counter

public class VariableLong
extends VariableNumber

A number object holding a variable long integer value.

Since:
1.1
Version:
$Revision: 1.1 $
Author:
Stephen Battey
See Also:
VariableNumber, Serialized Form

Field Summary
private  long value
          The underlying value.
 
Constructor Summary
VariableLong(long value)
          Create a variable number to hold a long value.
VariableLong(Number value)
          Create a variable number to hold a long value.
 
Method Summary
 double doubleValue()
           
 boolean equals(Object obj)
           
 float floatValue()
           
 int hashCode()
           
 int intValue()
           
 long longValue()
           
protected  void setValueInternal(double value)
          An internal set command.
protected  void setValueInternal(float value)
          An internal set command.
protected  void setValueInternal(int value)
          An internal set command.
protected  void setValueInternal(long value)
          An internal set command.
 String toString()
           
 
Methods inherited from class net.lucidviews.util.VariableNumber
isSecure, secure, setValue, setValue, setValue, setValue, setValue, setValue, setValueInternal, setValueInternal, verifyNotSecure
 
Methods inherited from class java.lang.Number
byteValue, shortValue
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

value

private long value
The underlying value.

Constructor Detail

VariableLong

public VariableLong(long value)
Create a variable number to hold a long value.
The number object is initialised with the given value.

Parameters:
value - the initial value

VariableLong

public VariableLong(Number value)
Create a variable number to hold a long value.
The number object is initialised with the given number.

Parameters:
value - the initial value
Throws:
NullPointerException - if the initial value is null
Method Detail

setValueInternal

protected void setValueInternal(int value)
Description copied from class: VariableNumber
An internal set command.
This function will only be called if the number is still in a variable state.

Specified by:
setValueInternal in class VariableNumber
Parameters:
value - the new value for this number

setValueInternal

protected void setValueInternal(long value)
Description copied from class: VariableNumber
An internal set command.
This function will only be called if the number is still in a variable state.

Specified by:
setValueInternal in class VariableNumber
Parameters:
value - the new value for this number

setValueInternal

protected void setValueInternal(float value)
Description copied from class: VariableNumber
An internal set command.
This function will only be called if the number is still in a variable state.

Specified by:
setValueInternal in class VariableNumber
Parameters:
value - the new value for this number

setValueInternal

protected void setValueInternal(double value)
Description copied from class: VariableNumber
An internal set command.
This function will only be called if the number is still in a variable state.

Specified by:
setValueInternal in class VariableNumber
Parameters:
value - the new value for this number

intValue

public int intValue()
Specified by:
intValue in class Number

longValue

public long longValue()
Specified by:
longValue in class Number

floatValue

public float floatValue()
Specified by:
floatValue in class Number

doubleValue

public double doubleValue()
Specified by:
doubleValue in class Number

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object