public static final class State.Group
extends Object
implements Externalizable
Constructor and Description |
---|
Group()
Constructs an instance.
|
Group(String name)
Constructs an instance.
|
Modifier and Type | Method and Description |
---|---|
Optional<State> |
get(int code)
Gets a state by its code.
|
Optional<State> |
get(Integer code)
Gets a state by its code.
|
Optional<State> |
get(String name)
Gets a state by its name.
|
String |
getName()
Gets the name of this group.
|
List<State> |
getStatesByCode()
Gets the states by code.
|
List<State> |
getStatesByName()
Gets the states by name.
|
void |
put(State state)
Puts a state in this group.
|
void |
readExternal(ObjectInput input) |
int |
size()
Returns the number of states in this group.
|
void |
writeExternal(ObjectOutput output) |
public Group()
This is needed for an Externalizable implementation.
public Group(@Nonnull String name)
name
- The name of the state group.@Nonnull @CheckReturnValue public Optional<State> get(int code)
code
- The code.@Nonnull @CheckReturnValue public Optional<State> get(@Nonnull Integer code)
code
- The code.@Nonnull @CheckReturnValue public Optional<State> get(@Nonnull String name)
name
- The name.@Nonnull @CheckReturnValue public String getName()
@Nonnull @CheckReturnValue public List<State> getStatesByCode()
@Nonnull @CheckReturnValue public List<State> getStatesByName()
public void put(@Nonnull State state)
state
- The state.public void readExternal(ObjectInput input) throws IOException
readExternal
in interface Externalizable
IOException
@CheckReturnValue public int size()
public void writeExternal(ObjectOutput output) throws IOException
writeExternal
in interface Externalizable
IOException
Copyright © 2003-2019 Serge Brisson. All Rights Reserved.