org.teleal.cling.model.types
Class UnsignedVariableInteger

java.lang.Object
  extended by org.teleal.cling.model.types.UnsignedVariableInteger
Direct Known Subclasses:
UnsignedIntegerFourBytes, UnsignedIntegerOneByte, UnsignedIntegerTwoBytes

public abstract class UnsignedVariableInteger
extends Object

A crude solution for unsigned "non-negative" types in UPnP, not usable for any arithmetic.

Author:
Christian Bauer

Nested Class Summary
static class UnsignedVariableInteger.Bits
           
 
Field Summary
protected  long value
           
 
Constructor Summary
protected UnsignedVariableInteger()
           
  UnsignedVariableInteger(long value)
           
  UnsignedVariableInteger(String s)
           
 
Method Summary
 boolean equals(Object o)
           
abstract  UnsignedVariableInteger.Bits getBits()
           
 int getMinValue()
           
 Long getValue()
           
 int hashCode()
           
 UnsignedVariableInteger increment(boolean rolloverToOne)
           
 void isInRange(long value)
           
protected  UnsignedVariableInteger setValue(long value)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

value

protected long value
Constructor Detail

UnsignedVariableInteger

protected UnsignedVariableInteger()

UnsignedVariableInteger

public UnsignedVariableInteger(long value)
                        throws NumberFormatException
Throws:
NumberFormatException

UnsignedVariableInteger

public UnsignedVariableInteger(String s)
                        throws NumberFormatException
Throws:
NumberFormatException
Method Detail

setValue

protected UnsignedVariableInteger setValue(long value)

getValue

public Long getValue()

isInRange

public void isInRange(long value)
               throws NumberFormatException
Throws:
NumberFormatException

getMinValue

public int getMinValue()

getBits

public abstract UnsignedVariableInteger.Bits getBits()

increment

public UnsignedVariableInteger increment(boolean rolloverToOne)

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2010 Teleal GmbH, Switzerland. All Rights Reserved.