Class EntityList<T extends Entity<T>>
- java.lang.Object
-
- de.fraunhofer.iosb.ilt.sta.model.ext.EntityList<T>
-
- Type Parameters:
T- the entity's type
- All Implemented Interfaces:
EntityCollection<T>,Iterable<T>,Collection<T>
public class EntityList<T extends Entity<T>> extends Object implements EntityCollection<T>
An entity set.- Author:
- Nils Sommer, Hylke van der Schaaf
-
-
Constructor Summary
Constructors Constructor Description EntityList(EntityType entityType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(T e)booleanaddAll(Collection<? extends T> c)voidclear()booleancontains(Object o)booleancontainsAll(Collection<?> c)voidfetchNext()Use the nextLink to fetch more Entities.Iterator<T>fullIterator()longgetCount()Get the count value if available.URIgetNextLink()EntityTypegetType()booleanhasNextLink()booleanisEmpty()Iterator<T>iterator()booleanremove(Object o)booleanremoveAll(Collection<?> c)voidreplaceAll(Collection<T> other)booleanretainAll(Collection<?> c)voidsetCount(long count)Set the count value.voidsetNextLink(URI nextLink)voidsetService(SensorThingsService service, Class<T> entityClass)intsize()Object[]toArray()<T> T[]toArray(T[] a)List<T>toList()Convert the EntityCollection to aList.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Collection
equals, hashCode, parallelStream, removeIf, spliterator, stream, toArray
-
-
-
-
Constructor Detail
-
EntityList
public EntityList(EntityType entityType)
-
-
Method Detail
-
getType
public EntityType getType()
- Specified by:
getTypein interfaceEntityCollection<T extends Entity<T>>
-
size
public int size()
- Specified by:
sizein interfaceCollection<T extends Entity<T>>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceCollection<T extends Entity<T>>
-
contains
public boolean contains(Object o)
- Specified by:
containsin interfaceCollection<T extends Entity<T>>
-
hasNextLink
public boolean hasNextLink()
- Specified by:
hasNextLinkin interfaceEntityCollection<T extends Entity<T>>- Returns:
- true if there is a nextLink to fetch more Entities.
-
fetchNext
public void fetchNext() throws StatusCodeExceptionDescription copied from interface:EntityCollectionUse the nextLink to fetch more Entities.- Specified by:
fetchNextin interfaceEntityCollection<T extends Entity<T>>- Throws:
StatusCodeException
-
toArray
public Object[] toArray()
- Specified by:
toArrayin interfaceCollection<T extends Entity<T>>
-
toArray
public <T> T[] toArray(T[] a)
- Specified by:
toArrayin interfaceCollection<T extends Entity<T>>
-
remove
public boolean remove(Object o)
- Specified by:
removein interfaceCollection<T extends Entity<T>>
-
containsAll
public boolean containsAll(Collection<?> c)
- Specified by:
containsAllin interfaceCollection<T extends Entity<T>>
-
addAll
public boolean addAll(Collection<? extends T> c)
- Specified by:
addAllin interfaceCollection<T extends Entity<T>>
-
removeAll
public boolean removeAll(Collection<?> c)
- Specified by:
removeAllin interfaceCollection<T extends Entity<T>>
-
retainAll
public boolean retainAll(Collection<?> c)
- Specified by:
retainAllin interfaceCollection<T extends Entity<T>>
-
replaceAll
public void replaceAll(Collection<T> other)
-
clear
public void clear()
- Specified by:
clearin interfaceCollection<T extends Entity<T>>
-
toList
public List<T> toList()
Description copied from interface:EntityCollectionConvert the EntityCollection to aList.- Specified by:
toListin interfaceEntityCollection<T extends Entity<T>>- Returns:
- the list
-
getCount
public long getCount()
Description copied from interface:EntityCollectionGet the count value if available.- Specified by:
getCountin interfaceEntityCollection<T extends Entity<T>>- Returns:
- the count value
-
setCount
public void setCount(long count)
Description copied from interface:EntityCollectionSet the count value.- Specified by:
setCountin interfaceEntityCollection<T extends Entity<T>>- Parameters:
count- the count value
-
getNextLink
public URI getNextLink()
-
setNextLink
public void setNextLink(URI nextLink)
-
setService
public void setService(SensorThingsService service, Class<T> entityClass)
-
-