org.llrp.ltk.types
Class LLRPNumberType

java.lang.Object
  extended by org.llrp.ltk.types.LLRPType
      extended by org.llrp.ltk.types.LLRPNumberType
Direct Known Subclasses:
Bit, SignedByte, SignedInteger, SignedShort, UnsignedByte, UnsignedInteger, UnsignedInteger96, UnsignedLong, UnsignedShort

public abstract class LLRPNumberType
extends LLRPType

Super Type for all numerical types!


Field Summary
protected  boolean signed
           
 
Constructor Summary
LLRPNumberType()
           
 
Method Summary
 boolean equals(java.lang.Object other)
          compare two numbers.
 int hashCode()
           
abstract  boolean inRange(long value)
           
 int intValue()
           
abstract  java.lang.Integer toInteger()
          LLRPNumberType is super type of all types representing a number.
 java.lang.String toString()
          String representation
 
Methods inherited from class org.llrp.ltk.types.LLRPType
decodeBinary, decodeXML, encodeBinary, encodeXML, inRange, toString, toXMLString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

signed

protected boolean signed
Constructor Detail

LLRPNumberType

public LLRPNumberType()
Method Detail

toInteger

public abstract java.lang.Integer toInteger()
LLRPNumberType is super type of all types representing a number.

Returns:
Integer!

intValue

public int intValue()

equals

public boolean equals(java.lang.Object other)
compare two numbers.

Overrides:
equals in class java.lang.Object
Parameters:
other - to compare
Returns:
boolean

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Description copied from class: LLRPType
String representation

Overrides:
toString in class LLRPType
Returns:
String

inRange

public abstract boolean inRange(long value)


Copyright © 2007 ETH Zurich.