public class MultiValueEntity<T extends NameAndValue> extends Object implements Iterable<T>
| Constructor and Description |
|---|
MultiValueEntity(List<T> entities) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
exist() |
T |
get(String entityName)
Get a single entity with the supplied name.
|
List<T> |
getList(String entityName)
Get all entities with the supplied name.
|
String |
getValue(String entityName)
Get a single entity value with the supplied name.
|
List<String> |
getValues(String entityName)
Get all entity values of the entity with supplied name.
|
boolean |
hasEntityWithName(String entityName)
C
See if a entity with the given name exists
|
Iterator<T> |
iterator() |
List<T> |
list() |
int |
size() |
String |
toString() |
public int size()
public boolean exist()
true if one or more entities are defined, false otherwise.public boolean hasEntityWithName(String entityName)
entityName - The name of the entity to checktrue if the entity existspublic T get(String entityName)
entityName then
the first one is returned.entityName - The name of the entity to findnull if no entity was found.public String getValue(String entityName)
headerName then
the first one is returned.entityName - The name of the header to findnull if no header was found.public List<T> getList(String entityName)
entityName then
a list with only that entity is returned.entityName - The name of the entity to findpublic List<String> getValues(String entityName)
entity name then
a list with only that header value is returned.entityName - The name of the entity to findpublic Iterator<T> iterator()
iterator in interface Iterable<T extends NameAndValue>Copyright © 2010–2014. All rights reserved.