org.llrp.ltk.generated.enumerations
Class AirProtocolsArray

java.lang.Object
  extended by org.llrp.ltk.types.LLRPType
      extended by org.llrp.ltk.types.UnsignedByteArray
          extended by org.llrp.ltk.generated.enumerations.AirProtocolsArray
All Implemented Interfaces:
LLRPEnumeration

public class AirProtocolsArray
extends UnsignedByteArray
implements LLRPEnumeration

AirProtocolsArray is Enumeration of Type UnsignedByteArray


Field Summary
static int EPCGlobalClass1Gen2
           
static int Unspecified
           
 
Fields inherited from class org.llrp.ltk.types.UnsignedByteArray
bytes, signed, value
 
Constructor Summary
AirProtocolsArray()
           
AirProtocolsArray(org.jdom.Element element)
          Create new AirProtocolsArray by passing jdom element.
AirProtocolsArray(int value)
          Create new AirProtocolsArray by passing integer value.
AirProtocolsArray(LLRPBitList list)
          Create new AirProtocolsArray by passing LLRPBitList.
AirProtocolsArray(java.lang.String element)
          Create new AirProtocolsArray by passing a string
 
Method Summary
 org.jdom.Content encodeXML(java.lang.String name, org.jdom.Namespace ns)
          encode to XML
 java.lang.String getName(int value)
          get name of a value if no name can be found for given value return empty string.
 int getValue(java.lang.String name)
          get value of a name representing a value if no value can be found, return -1.
 int intValue()
          There is no reasonable representation as int return 0
 boolean isValidName(java.lang.String name)
          check if the name stands for an allowed value of this enumeration.
 boolean isValidValue(int value)
          check if a value is allowed for an enumeration.
static int length()
          number of bits used to represent this type.
 void set(int value)
          if no position is provided, the first element is set
 void set(int value, int position)
          set a value of this enumeration to the value identified by given string.
 void set(java.lang.String name)
          if no position is provided, the first element is set
 void set(java.lang.String name, int position)
          set a value of this enumeration to the value identified by given string.
 java.lang.String toString()
          String representation
 
Methods inherited from class org.llrp.ltk.types.UnsignedByteArray
add, decodeBinary, decodeXML, encodeBinary, get, getByteLength, inRange, set, size, toInteger, toString
 
Methods inherited from class org.llrp.ltk.types.LLRPType
toXMLString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

Unspecified

public static final int Unspecified
See Also:
Constant Field Values

EPCGlobalClass1Gen2

public static final int EPCGlobalClass1Gen2
See Also:
Constant Field Values
Constructor Detail

AirProtocolsArray

public AirProtocolsArray()

AirProtocolsArray

public AirProtocolsArray(int value)
Create new AirProtocolsArray by passing integer value.

Parameters:
value - an Integer value allowed - might check first with isValidValue it it is an allowed value
Throws:
java.lang.IllegalArgumentException - if the value is not allowed for this enumeration

AirProtocolsArray

public AirProtocolsArray(org.jdom.Element element)
Create new AirProtocolsArray by passing jdom element.

Parameters:
element - - jdom element where the child is a string that contains several names for values of the enumeration.
Throws:
java.lang.IllegalArgumentException - String must be a concatenation of several enumeration strings seperated by whitespace

AirProtocolsArray

public AirProtocolsArray(java.lang.String element)
Create new AirProtocolsArray by passing a string

Parameters:
element - - string that contains several names for values of the enumeration.
Throws:
java.lang.IllegalArgumentException - String must be a concatenation of several enumeration strings seperated by whitespace

AirProtocolsArray

public AirProtocolsArray(LLRPBitList list)
Create new AirProtocolsArray by passing LLRPBitList.

Parameters:
list - - LLRPBitList
Throws:
java.lang.IllegalArgumentException - if the value found in the BitList is not allowed for this enumeration.
Method Detail

set

public final void set(java.lang.String name,
                      int position)
set a value of this enumeration to the value identified by given string.

Parameters:
name - set this enumeration to hold one of the allowed values
Throws:
java.lang.IllegalArgumentException - if the value found for given String is not allowed for this enumeration.

set

public final void set(java.lang.String name)
if no position is provided, the first element is set

Specified by:
set in interface LLRPEnumeration
Parameters:
name - set this enumeration to hold one of the allowed values

set

public final void set(int value,
                      int position)
set a value of this enumeration to the value identified by given string.

Parameters:
value - to be set at position
Throws:
java.lang.IllegalArgumentException - if the value found for given String is not allowed for this enumeration.

set

public final void set(int value)
if no position is provided, the first element is set

Specified by:
set in interface LLRPEnumeration
Parameters:
value - to be set

encodeXML

public org.jdom.Content encodeXML(java.lang.String name,
                                  org.jdom.Namespace ns)
encode to XML

Overrides:
encodeXML in class UnsignedByteArray
Parameters:
name - of element
ns - Namespace

toString

public java.lang.String toString()
String representation

Specified by:
toString in interface LLRPEnumeration
Overrides:
toString in class UnsignedByteArray
Returns:
String

intValue

public int intValue()
There is no reasonable representation as int return 0

Specified by:
intValue in interface LLRPEnumeration

isValidValue

public boolean isValidValue(int value)
check if a value is allowed for an enumeration.

Specified by:
isValidValue in interface LLRPEnumeration
Parameters:
value - to set
Returns:
boolean

getValue

public final int getValue(java.lang.String name)
get value of a name representing a value if no value can be found, return -1.

Specified by:
getValue in interface LLRPEnumeration
Parameters:
name - for value
Returns:
int

getName

public final java.lang.String getName(int value)
get name of a value if no name can be found for given value return empty string.

Specified by:
getName in interface LLRPEnumeration
Parameters:
value - of name
Returns:
String

isValidName

public boolean isValidName(java.lang.String name)
check if the name stands for an allowed value of this enumeration.

Specified by:
isValidName in interface LLRPEnumeration
Parameters:
name - to check
Returns:
boolean

length

public static int length()
number of bits used to represent this type.

Returns:
Integer


Copyright © 2007 ETH Zurich.