| Modifier and Type | Class and Description |
|---|---|
| public static interface | NamedInteger.
Marks a subclass that provides a method |
| protected static interface | NamedInteger.
The instance type. T extends NamedInteger>Constructor for "undefined" values. |
| Modifier and Type | Field and Description |
|---|---|
| private final int | id
The ID value. |
| private final String | name
The name. |
| private static final long |
| Access | Constructor and Description |
|---|---|
| protected | |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public final boolean | equals(@Nullable Object
the reference object with which to compare. obj)Overrides java. Indicates whether some other object is "equal to" this one. |
| public final int | |
| protected static final < The instance type. T extends NamedInteger> T[] | Returns: The verifiedVALUES array.The values)VALUES array.Ensures that the |
| public final String | |
| protected static final < The instance type. T extends NamedInteger> T | Returns: The instance.The values, NamedInteger.VALUES array.The constructor for undefined values. constr,The value. v)Returns an instance given an integer value. |
| public final String | |
| public final int |
| id | back to summary |
|---|---|
| private final int id The ID value. | |
| name | back to summary |
|---|---|
| private final String name The name. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| NamedInteger | back to summary |
|---|---|
| protected NamedInteger(int id) Creates a new
| |
| NamedInteger | back to summary |
|---|---|
| protected NamedInteger(String name, int id) Creates a new
| |
| equals | back to summary |
|---|---|
| public final boolean equals(@Nullable Object obj) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| hashCode | back to summary |
|---|---|
| public final int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| init | back to summary |
|---|---|
| protected static final <T extends NamedInteger> T[] init(T[] values) Ensures that the
| |
| name | back to summary |
|---|---|
| public final String name() Returns the name.
| |
| ofValue | back to summary |
|---|---|
| protected static final <T extends NamedInteger> T ofValue(T[] values, NamedInteger. Returns an instance given an integer value.
| |
| toString | back to summary |
|---|---|
| public final String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| value | back to summary |
|---|---|
| public final int value() Returns the value.
| |
"public static T ofValue(int v)" that allows
casting an integer to this type via reflection.
| Modifier and Type | Method and Description |
|---|---|
| public T |
| newInstance | back to summary |
|---|---|
| public T newInstance(int id) Creates a new "undefined" value instance.
| |