public final class State
extends Number
implements Externalizable
| Modifier and Type | Class and Description |
|---|---|
static class |
State.Group
Group.
|
| Constructor and Description |
|---|
State()
Constructs an instance.
|
State(Optional<Integer> code,
Optional<String> name)
Constructs an instance.
|
| Modifier and Type | Method and Description |
|---|---|
double |
doubleValue() |
boolean |
equals(Object other) |
float |
floatValue() |
static State |
fromString(String string)
Returns a state from a string representation.
|
Optional<Integer> |
getCode()
Gets this state's code.
|
Optional<String> |
getName()
Gets this state's name.
|
int |
hashCode() |
int |
intValue() |
long |
longValue() |
void |
readExternal(ObjectInput input) |
String |
toString() |
void |
writeExternal(ObjectOutput output) |
public State()
This is needed for an Externalizable implementation.
public State(@Nonnull
Optional<Integer> code,
@Nonnull
Optional<String> name)
code - The state code.name - The state name.@Nonnull @CheckReturnValue public static State fromString(String string)
string - The string representation.public double doubleValue()
doubleValue in class Numberpublic boolean equals(Object other)
equals in class Objectpublic float floatValue()
floatValue in class Number@Nonnull @CheckReturnValue public Optional<Integer> getCode()
@Nonnull @CheckReturnValue public Optional<String> getName()
public int hashCode()
hashCode in class Objectpublic int intValue()
intValue in class Numberpublic long longValue()
longValue in class Numberpublic void readExternal(ObjectInput input)
throws IOException
readExternal in interface ExternalizableIOExceptionpublic String toString()
toString in class Objectpublic void writeExternal(ObjectOutput output)
throws IOException
writeExternal in interface ExternalizableIOExceptionCopyright © 2003-2019 Serge Brisson. All Rights Reserved.