public class EntityListComponent extends AbstractMessageComponent
Constructor and Description |
---|
EntityListComponent(java.lang.String name)
Construct an EntityListComponent with no content.
|
EntityListComponent(java.lang.String name,
java.util.Collection<? extends Entity> entities)
Construct an EntityListComponent with a specific list of entities.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<Entity> |
getEntities()
Get the entities that make up this message component.
|
void |
read(java.io.InputStream in)
Read this component from a stream.
|
void |
setEntities(java.util.Collection<? extends Entity> entities)
Set the entities that make up this message component.
|
java.lang.String |
toString() |
void |
write(java.io.OutputStream out)
Write this component to a stream.
|
getName
public EntityListComponent(java.lang.String name)
name
- The name of the component.public EntityListComponent(java.lang.String name, java.util.Collection<? extends Entity> entities)
name
- The name of the component.entities
- The entities in this message component.public java.util.List<Entity> getEntities()
public void setEntities(java.util.Collection<? extends Entity> entities)
entities
- The entities in this component.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