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 boolean
add(T e)
boolean
addAll(Collection<? extends T> c)
void
clear()
boolean
contains(Object o)
boolean
containsAll(Collection<?> c)
void
fetchNext()
Use the nextLink to fetch more Entities.Iterator<T>
fullIterator()
long
getCount()
Get the count value if available.URI
getNextLink()
EntityType
getType()
boolean
hasNextLink()
boolean
isEmpty()
Iterator<T>
iterator()
boolean
remove(Object o)
boolean
removeAll(Collection<?> c)
void
replaceAll(Collection<T> other)
boolean
retainAll(Collection<?> c)
void
setCount(long count)
Set the count value.void
setNextLink(URI nextLink)
void
setService(SensorThingsService service, Class<T> entityClass)
int
size()
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:
getType
in interfaceEntityCollection<T extends Entity<T>>
-
size
public int size()
- Specified by:
size
in interfaceCollection<T extends Entity<T>>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceCollection<T extends Entity<T>>
-
contains
public boolean contains(Object o)
- Specified by:
contains
in interfaceCollection<T extends Entity<T>>
-
hasNextLink
public boolean hasNextLink()
- Specified by:
hasNextLink
in interfaceEntityCollection<T extends Entity<T>>
- Returns:
- true if there is a nextLink to fetch more Entities.
-
fetchNext
public void fetchNext() throws StatusCodeException
Description copied from interface:EntityCollection
Use the nextLink to fetch more Entities.- Specified by:
fetchNext
in interfaceEntityCollection<T extends Entity<T>>
- Throws:
StatusCodeException
-
toArray
public Object[] toArray()
- Specified by:
toArray
in interfaceCollection<T extends Entity<T>>
-
toArray
public <T> T[] toArray(T[] a)
- Specified by:
toArray
in interfaceCollection<T extends Entity<T>>
-
remove
public boolean remove(Object o)
- Specified by:
remove
in interfaceCollection<T extends Entity<T>>
-
containsAll
public boolean containsAll(Collection<?> c)
- Specified by:
containsAll
in interfaceCollection<T extends Entity<T>>
-
addAll
public boolean addAll(Collection<? extends T> c)
- Specified by:
addAll
in interfaceCollection<T extends Entity<T>>
-
removeAll
public boolean removeAll(Collection<?> c)
- Specified by:
removeAll
in interfaceCollection<T extends Entity<T>>
-
retainAll
public boolean retainAll(Collection<?> c)
- Specified by:
retainAll
in interfaceCollection<T extends Entity<T>>
-
replaceAll
public void replaceAll(Collection<T> other)
-
clear
public void clear()
- Specified by:
clear
in interfaceCollection<T extends Entity<T>>
-
toList
public List<T> toList()
Description copied from interface:EntityCollection
Convert the EntityCollection to aList
.- Specified by:
toList
in interfaceEntityCollection<T extends Entity<T>>
- Returns:
- the list
-
getCount
public long getCount()
Description copied from interface:EntityCollection
Get the count value if available.- Specified by:
getCount
in interfaceEntityCollection<T extends Entity<T>>
- Returns:
- the count value
-
setCount
public void setCount(long count)
Description copied from interface:EntityCollection
Set the count value.- Specified by:
setCount
in 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)
-
-