2009-01-09 1.2.0

org.eclipse.soda.dk.core
Class LargeInteger

java.lang.Object
  extended by java.lang.Number
      extended by org.eclipse.soda.dk.core.LargeInteger
All Implemented Interfaces:
java.io.Serializable

public class LargeInteger
extends java.lang.Number

Version:
1.2.0
See Also:
Serialized Form

Constructor Summary
LargeInteger()
          Constructs an instance of this class.
LargeInteger(byte[] bytes)
          Constructs an instance of this class from the specified bytes parameter.
LargeInteger(java.lang.String string)
          Constructs an instance of this class from the specified string parameter.
 
Method Summary
static byte[] addDigit(byte[] bytes, int digit)
          Add digit with the specified bytes and digit parameters and return the byte[] result.
static byte[] complementBytes(byte[] bytes)
          Complement with the specified bytes parameter and return the byte[] result.
 double doubleValue()
          Double value and return the double result.
 float floatValue()
          Float value and return the float result.
 byte[] getBytes()
          Gets the bytes (byte[]) value.
 int intValue()
          Int value and return the int result.
static byte[] largeNumberBytes(java.lang.String number)
          Large number with the specified number parameter and return the byte[] result.
static java.lang.String largeNumberString(byte[] bytes)
          Large number string with the specified bytes parameter and return the String result.
 long longValue()
          Long value and return the long result.
 byte[] multiplyByTen(byte[] bytes)
          Multiply by ten with the specified bytes parameter and return the byte[] result.
static byte[] reduceBytes(byte[] bytes, boolean negative)
          Reduce bytes with the specified bytes and negative parameters and return the byte[] result.
 void setBytes(byte[] bytes)
          Sets the bytes value.
 java.lang.String toString()
          Returns the string value.
static java.lang.String unsignedLargeNumberString(byte[] bytes)
          Unsigned large number string with the specified bytes parameter and return the String result.
 
Methods inherited from class java.lang.Number
byteValue, shortValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LargeInteger

public LargeInteger()
Constructs an instance of this class.

See Also:
LargeInteger(byte[]), LargeInteger(String)

LargeInteger

public LargeInteger(byte[] bytes)
Constructs an instance of this class from the specified bytes parameter.

Parameters:
bytes - The bytes (byte[]) parameter.
See Also:
LargeInteger(), LargeInteger(String)

LargeInteger

public LargeInteger(java.lang.String string)
Constructs an instance of this class from the specified string parameter.

Parameters:
string - The string (String) parameter.
See Also:
LargeInteger(), LargeInteger(byte[])
Method Detail

addDigit

public static final byte[] addDigit(byte[] bytes,
                                    int digit)
Add digit with the specified bytes and digit parameters and return the byte[] result.

Parameters:
bytes - The bytes (byte[]) parameter.
digit - The digit (int) parameter.
Returns:
Results of the add digit (byte[]) value.

complementBytes

public static final byte[] complementBytes(byte[] bytes)
Complement with the specified bytes parameter and return the byte[] result.

Parameters:
bytes - The bytes (byte[]) parameter.
Returns:
Results of the complement (byte[]) value.
See Also:
largeNumberBytes(String), reduceBytes(byte[],boolean), getBytes(), setBytes(byte[])

largeNumberBytes

public static final byte[] largeNumberBytes(java.lang.String number)
Large number with the specified number parameter and return the byte[] result.

Parameters:
number - The number (String) parameter.
Returns:
Results of the large number (byte[]) value.

largeNumberString

public static final java.lang.String largeNumberString(byte[] bytes)
Large number string with the specified bytes parameter and return the String result.

Parameters:
bytes - The bytes (byte[]) parameter.
Returns:
Results of the large number string (String) value.
See Also:
unsignedLargeNumberString(byte[])

reduceBytes

public static final byte[] reduceBytes(byte[] bytes,
                                       boolean negative)
Reduce bytes with the specified bytes and negative parameters and return the byte[] result.

Parameters:
bytes - The bytes (byte[]) parameter.
negative - The negative (boolean) parameter.
Returns:
Results of the reduce bytes (byte[]) value.
See Also:
complementBytes(byte[]), largeNumberBytes(String), getBytes(), setBytes(byte[])

unsignedLargeNumberString

public static final java.lang.String unsignedLargeNumberString(byte[] bytes)
Unsigned large number string with the specified bytes parameter and return the String result.

Parameters:
bytes - The bytes (byte[]) parameter.
Returns:
Results of the unsigned large number string (String) value.

doubleValue

public double doubleValue()
Double value and return the double result.

Specified by:
doubleValue in class java.lang.Number
Returns:
Results of the double value (double) value.
See Also:
floatValue(), intValue(), longValue()

floatValue

public float floatValue()
Float value and return the float result.

Specified by:
floatValue in class java.lang.Number
Returns:
Results of the float value (float) value.
See Also:
doubleValue(), intValue(), longValue()

getBytes

public byte[] getBytes()
Gets the bytes (byte[]) value.

Returns:
The bytes (byte[]) value.
See Also:
complementBytes(byte[]), largeNumberBytes(String), reduceBytes(byte[],boolean), setBytes(byte[])

intValue

public int intValue()
Int value and return the int result.

Specified by:
intValue in class java.lang.Number
Returns:
Results of the int value (int) value.
See Also:
doubleValue(), floatValue(), longValue()

longValue

public long longValue()
Long value and return the long result.

Specified by:
longValue in class java.lang.Number
Returns:
Results of the long value (long) value.
See Also:
doubleValue(), floatValue(), intValue()

multiplyByTen

public byte[] multiplyByTen(byte[] bytes)
Multiply by ten with the specified bytes parameter and return the byte[] result.

Parameters:
bytes - The bytes (byte[]) parameter.
Returns:
Results of the multiply by ten (byte[]) value.

setBytes

public void setBytes(byte[] bytes)
Sets the bytes value.

Parameters:
bytes - The bytes (byte[]) parameter.
See Also:
complementBytes(byte[]), largeNumberBytes(String), reduceBytes(byte[],boolean), getBytes()

toString

public java.lang.String toString()
Returns the string value.

Overrides:
toString in class java.lang.Object
Returns:
The string (String) value.
See Also:
largeNumberString(byte[]), unsignedLargeNumberString(byte[])

2009-01-09 1.2.0

Copyright (c) 2009 IBM. See license in Legal section.