www.element4solution.com

e4s.util
Class E4Long

java.lang.Object
  extended by e4s.util.E4Long
All Implemented Interfaces:
java.lang.Comparable
Direct Known Subclasses:
E4CompanyId, E4Gender, TimeZone

public class E4Long
extends java.lang.Object
implements java.lang.Comparable

Similar to a Long datatype, but it is possible to inheritance sub classes from this type. It is used to build up user defined and generated classes for long values.

Since:
JDK 1.4
See Also:
E4ModuleDictionaryTypes, E4DBType, E4String

Constructor Summary
E4Long()
           
E4Long(E4Long value)
           
E4Long(int value)
           
E4Long(long value)
           
E4Long(java.lang.Long value)
           
 
Method Summary
static java.lang.String _getSVNVersionString()
          Get version info string from subversion.
 void add(E4Long v)
          Add a value.
 void add(int v)
          Add a value.
 void add(long v)
          Add a value.
 void add(java.lang.Long v)
          Add a value.
 java.lang.Object clone()
           
 int compareTo(java.lang.Object anotherLong)
           
 boolean equals(E4Long compare)
          Compare value with another value.
 boolean equals(long compare)
          Compare value with another value.
static java.lang.String format(E4Long n, int places)
          Format a long using leading '0'.
 java.lang.String format(int places)
          Format a long using leading '0'.
static java.lang.String format(long n, int places)
          Format a long using leading '0'.
 long longValue()
          Get the value of the E4Long object.
 void set(boolean value)
          Set the value of the E4Long object.
 void set(E4Long value)
          Set the value of the E4Long object.
 void set(int value)
          Set the value of the E4Long object.
 void set(long value)
          Set the value of the E4Long object.
 void set(java.lang.Long value)
          Set the value of the E4Long object.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

E4Long

public E4Long()

E4Long

public E4Long(long value)

E4Long

public E4Long(int value)

E4Long

public E4Long(java.lang.Long value)

E4Long

public E4Long(E4Long value)
Method Detail

set

public void set(long value)
Set the value of the E4Long object.

Parameters:
value - the new value

set

public void set(int value)
Set the value of the E4Long object.

Parameters:
value - the new value

set

public void set(boolean value)
Set the value of the E4Long object.

Parameters:
value - the new value (true = 1, false = 0)

set

public void set(java.lang.Long value)
Set the value of the E4Long object.

Parameters:
value - the new value

set

public void set(E4Long value)
Set the value of the E4Long object.

Parameters:
value - the new value

longValue

public long longValue()
Get the value of the E4Long object.

Returns:
the current value

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

public boolean equals(long compare)
Compare value with another value.

Parameters:
compare - value the value to be compared
Returns:
true if equals

equals

public boolean equals(E4Long compare)
Compare value with another value.

Parameters:
compare - the value to be compared
Returns:
true if equals

add

public void add(int v)
Add a value.


add

public void add(long v)
Add a value.


add

public void add(E4Long v)
Add a value.


add

public void add(java.lang.Long v)
Add a value.


compareTo

public int compareTo(java.lang.Object anotherLong)
Specified by:
compareTo in interface java.lang.Comparable

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

format

public static java.lang.String format(long n,
                                      int places)
Format a long using leading '0'.

Parameters:
n - the long to be formatted
places - number of characters (a value between 1 and 30)
Returns:
the formatted value, e.g. format(123,6) returns 000123

format

public static java.lang.String format(E4Long n,
                                      int places)
Format a long using leading '0'.

Parameters:
n - the long to be formatted
places - number of characters (a value between 1 and 30)
Returns:
the formatted value, e.g. format(123,6) returns 000123

format

public java.lang.String format(int places)
Format a long using leading '0'.

Parameters:
n - the long to be formatted
places - number of characters (a value between 1 and 30)
Returns:
the formatted value, e.g. format(123,6) returns 000123

_getSVNVersionString

public static java.lang.String _getSVNVersionString()
Get version info string from subversion.

Returns:
the version info string.
See Also:
E4Util.getRevisionCodeFromSVN(Class)

www.element4solution.com