public class NamedInteger
extends java.lang.Object
This class is used to provide integers, associated with a name string. This can be used for combobox or list entries.
Modifier and Type | Field and Description |
---|---|
boolean |
hideNumber
Determines if the number should be displayed as well (false) or not (true).
|
java.lang.String |
name
Name of the integer
|
int |
value
Value of the named integer
|
Constructor and Description |
---|
NamedInteger()
Creates a new object without initializing name or integer.
|
NamedInteger(java.lang.String name,
int value)
Creates a new object and initializes name and value of the integer.
|
NamedInteger(java.lang.String name,
int value,
boolean hideNumber)
Creates a new object and initializes name and value of the integer.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
toString()
Returns a descriptive string containing.
|
public java.lang.String name
Name of the integer
public int value
Value of the named integer
public boolean hideNumber
Determines if the number should be displayed as well (false) or not (true).
public NamedInteger()
Creates a new object without initializing name or integer. So the initialization has to be done from outside.
public NamedInteger(java.lang.String name, int value)
Creates a new object and initializes name and value of the integer.
name
- Name of the integer.value
- Value of the integer.public NamedInteger(java.lang.String name, int value, boolean hideNumber)
Creates a new object and initializes name and value of the integer. The additional parameter hideNumber determines if the number should be displayed together with the name or not. Default is false (show both).
name
- Name of the integer.value
- Value of the integer.hideNumber
- Hide the number in toString()
or not