public class EntityIDListComponent extends AbstractMessageComponent
Constructor and Description |
---|
EntityIDListComponent(java.lang.String name)
Construct an EntityIDListComponent with no data.
|
EntityIDListComponent(java.lang.String name,
java.util.List<EntityID> ids)
Construct an EntityIDListComponent with a list of entity IDs.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<EntityID> |
getIDs()
Get the list of entity IDs in this component.
|
void |
read(java.io.InputStream in)
Read this component from a stream.
|
void |
setIDs(java.util.List<EntityID> newIDs)
Set the list of entity IDs in this component.
|
java.lang.String |
toString() |
void |
write(java.io.OutputStream out)
Write this component to a stream.
|
getName
public EntityIDListComponent(java.lang.String name)
name
- The name of the component.public EntityIDListComponent(java.lang.String name, java.util.List<EntityID> ids)
name
- The name of the component.ids
- The data.public java.util.List<EntityID> getIDs()
public void setIDs(java.util.List<EntityID> newIDs)
newIDs
- The new set of entity IDs.public void write(java.io.OutputStream out) throws java.io.IOException
MessageComponent
out
- The stream to write to.java.io.IOException
- If the write fails.public void read(java.io.InputStream in) throws java.io.IOException
MessageComponent
in
- The stream to read from.java.io.IOException
- If the read fails.public java.lang.String toString()
toString
in class java.lang.Object