public class EntityArray extends EntityCollectionSupport implements IndexedEntityCollection
size
times, and these clones become the indexed child entities.Constructor and Description |
---|
EntityArray()
Create a new EntityArray.
|
EntityArray(Entity prototype)
Create a new EntityArray with the specified prototype.
|
EntityArray(Entity prototype,
int size)
Create a new IndexedEntityCollection.
|
EntityArray(int size)
Create a new IndexedEntityCollection.
|
Modifier and Type | Method and Description |
---|---|
EntityArray |
clone()
Clone this EntityArray.
|
Entity |
getChild(int index)
Get the child at the specified index.
|
Collection<Entity> |
getChildren()
Get the children.
|
int |
getMaximumSize()
Get the int maximumSize.
|
int |
getMinimumSize()
Get the int minimumSize.
|
Entity |
getPrototype()
Get the prototype.
|
boolean |
isResizable()
Get the boolean resizable.
|
boolean |
isSizable()
Learn whether the size of this object can be set.
|
void |
setMaximumSize(int maximumSize)
Set the int maximumSize.
|
void |
setMinimumSize(int minimumSize)
Set the int minimumSize.
|
void |
setPrototype(Entity prototype)
Set the prototype.
|
void |
setResizable(boolean resizable)
Set the boolean resizable.
|
void |
setSize(int size)
Set new size of this object.
|
int |
size()
Get the size (# of child elements) of this IndexedEntityCollection.
|
getDelim, getValue, isDelimAfter, isSuppressEmptyChildren, length, readFrom, setDelim, setDelimAfter, setSuppressEmptyChildren, setValue, setValue, shouldSuppress, writeTo
fill, getValue
public EntityArray()
public EntityArray(int size)
size
- number of occurrences of the prototypical Entitypublic EntityArray(Entity prototype)
prototype
- Entitypublic EntityArray(Entity prototype, int size)
prototype
- Entitysize
- number of occurrencespublic Entity getChild(int index)
getChild
in interface IndexedEntityCollection
index
- intpublic Collection<Entity> getChildren()
getChildren
in interface EntityCollection
public Entity getPrototype()
public void setPrototype(Entity prototype)
prototype
- The Entity prototype to set.public void setSize(int size)
setSize
in interface IndexedEntityCollection
size
- to setIllegalArgumentException
- if size
is not valid.public int size()
size
in interface IndexedEntityCollection
public boolean isSizable()
isSizable
in interface IndexedEntityCollection
public EntityArray clone()
clone
in interface Entity
clone
in class EntityCollectionSupport
public int getMaximumSize()
public void setMaximumSize(int maximumSize)
maximumSize
- intpublic int getMinimumSize()
public void setMinimumSize(int minimumSize)
minimumSize
- intpublic boolean isResizable()
public void setResizable(boolean resizable)
resizable
- booleanCopyright © 2008-2016 The Apache Software Foundation. All Rights Reserved.