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 Number
public boolean equals(Object other)
equals
in class Object
public float floatValue()
floatValue
in class Number
@Nonnull @CheckReturnValue public Optional<Integer> getCode()
@Nonnull @CheckReturnValue public Optional<String> getName()
public int hashCode()
hashCode
in class Object
public int intValue()
intValue
in class Number
public long longValue()
longValue
in class Number
public void readExternal(ObjectInput input) throws IOException
readExternal
in interface Externalizable
IOException
public String toString()
toString
in class Object
public void writeExternal(ObjectOutput output) throws IOException
writeExternal
in interface Externalizable
IOException
Copyright © 2003-2019 Serge Brisson. All Rights Reserved.