public interface LLRPEnumeration
Modifier and Type | Method and Description |
---|---|
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() |
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.
|
void |
set(int value)
set the current value of this enumeration to the
value given.
|
void |
set(java.lang.String name)
set the current value of this enumeration to the
value identified by given string.
|
java.lang.String |
toString() |
boolean isValidValue(int value)
value
- to setint getValue(java.lang.String name)
name
- for valuejava.lang.String getName(int value)
value
- of nameboolean isValidName(java.lang.String name)
name
- to checkvoid set(java.lang.String name)
name
- set this enumeration to hold one of the allowed valuesjava.lang.IllegalArgumentException
- if the value found for given String is not allowed
for this enumeration.void set(int value)
value
- to be setjava.lang.IllegalArgumentException
- if the value is not allowed
for this enumeration.java.lang.String toString()
toString
in class java.lang.Object
int intValue()
Copyright © 2007 ETH Zurich.