com.jpeterson.util
Class Unsigned

java.lang.Object
  |
  +--com.jpeterson.util.Unsigned

public class Unsigned
extends java.lang.Object

This class allows a number to be converted to it's unsigned value. This works for bytes, shorts, and ints, as the value is returned as a long


Constructor Summary
Unsigned()
           
 
Method Summary
static void main(java.lang.String[] args)
           
static long unsigned(byte number)
          Return the unsigned value of the number.
static long unsigned(int number)
          Return the unsigned value of the number.
static long unsigned(short number)
          Return the unsigned value of the number.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Unsigned

public Unsigned()
Method Detail

unsigned

public static long unsigned(byte number)
Return the unsigned value of the number.
Parameters:
number - a byte value
Returns:
the unsigned value

unsigned

public static long unsigned(short number)
Return the unsigned value of the number.
Parameters:
number - a short value
Returns:
the unsigned value

unsigned

public static long unsigned(int number)
Return the unsigned value of the number.
Parameters:
number - an int value
Returns:
the unsigned value

main

public static void main(java.lang.String[] args)