Package io.vertigo.datamodel.data.model
Class DtList<D extends DataObject>
java.lang.Object
java.util.AbstractCollection<D>
java.util.AbstractList<D>
io.vertigo.datamodel.data.model.DtList<D>
- Type Parameters:
D- Type du DtObject
- All Implemented Interfaces:
Serializable,Iterable<D>,Collection<D>,List<D>,SequencedCollection<D>
Classe de stockage des listes.
Une dtList est une liste constituée avec un seul type d'objet.
Les objets null ne sont pas autorisés.
- Author:
- fconstantin
- See Also:
-
Field Summary
FieldsFields inherited from class java.util.AbstractList
modCount -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanbooleancontainsMetaData(String metaDataName) booleanget(int row) <O extends Serializable>
Optional<O> getMetaData(String metaDataName, Class<O> metaDataClass) getURI()inthashCode()static <D extends DataObject>
DtList<D> of(D dto, D... dtos) Static method factory for convenient creation of DtList using 'of' pattern.static <D extends DataObject>
DtList<D> Static method factory for convenient creation of DtList using 'of' pattern.remove(int row) voidsetMetaData(String metaDataName, Serializable value) Set a metaData on this list.intsize()subList(int start, int end) toString()Methods inherited from class java.util.AbstractList
addAll, clear, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRangeMethods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArrayMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.List
addAll, addFirst, addLast, contains, containsAll, getFirst, getLast, isEmpty, remove, removeAll, removeFirst, removeLast, replaceAll, retainAll, reversed, sort, spliterator, toArray, toArray
-
Field Details
-
TOTAL_COUNT_META
total count- See Also:
-
-
Constructor Details
-
DtList
Constructor.- Parameters:
dataDefinition- Définition de DT
-
DtList
Constructor.- Parameters:
dtList- DtList to cloneuri- DtList uri
-
DtList
Constructor.- Parameters:
dtObjectClass- Type d'objet
-
-
Method Details
-
of
Static method factory for convenient creation of DtList using 'of' pattern.- Type Parameters:
D- Type of this list- Parameters:
dto- the mandatory dto to add which defines the type.dtos- Dtos to add.- Returns:
- the created DtList.
-
of
Static method factory for convenient creation of DtList using 'of' pattern.- Type Parameters:
D- Type of this list- Parameters:
dto- the mandatory dto to add which defines the type.dtos- Dtos to add.- Returns:
- the created DtList.
-
get
- Specified by:
getin interfaceList<D extends DataObject>- Specified by:
getin classAbstractList<D extends DataObject>
-
set
- Specified by:
setin interfaceList<D extends DataObject>- Overrides:
setin classAbstractList<D extends DataObject>
-
size
public int size()- Specified by:
sizein interfaceCollection<D extends DataObject>- Specified by:
sizein interfaceList<D extends DataObject>- Specified by:
sizein classAbstractCollection<D extends DataObject>
-
toString
- Overrides:
toStringin classAbstractCollection<D extends DataObject>
-
add
- Specified by:
addin interfaceCollection<D extends DataObject>- Specified by:
addin interfaceList<D extends DataObject>- Overrides:
addin classAbstractList<D extends DataObject>
-
add
- Specified by:
addin interfaceList<D extends DataObject>- Overrides:
addin classAbstractList<D extends DataObject>
-
remove
- Specified by:
removein interfaceList<D extends DataObject>- Overrides:
removein classAbstractList<D extends DataObject>
-
subList
- Specified by:
subListin interfaceList<D extends DataObject>- Overrides:
subListin classAbstractList<D extends DataObject>
-
getDefinition
- Returns:
- Définition de la liste.
-
getURI
- Returns:
- URI de la ressource
-
getMetaDataNames
- Returns:
- MetaData names (only not null ones)
-
containsMetaData
- Parameters:
metaDataName- MetaData name- Returns:
- if this metadata is known and not null
-
getMetaData
public <O extends Serializable> Optional<O> getMetaData(String metaDataName, Class<O> metaDataClass) - Type Parameters:
O- MetaData value type- Parameters:
metaDataName- MetaData namemetaDataClass- MetaData value class- Returns:
- MetaData value
-
setMetaData
Set a metaData on this list. If value is null, the metadata is remove. WARN Developers must ensure this metaData keep coherent with current list datas, all the time. WARN- Parameters:
metaDataName- MetaData namevalue- MetaData value
-
equals
- Specified by:
equalsin interfaceCollection<D extends DataObject>- Specified by:
equalsin interfaceList<D extends DataObject>- Overrides:
equalsin classAbstractList<D extends DataObject>
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceCollection<D extends DataObject>- Specified by:
hashCodein interfaceList<D extends DataObject>- Overrides:
hashCodein classAbstractList<D extends DataObject>
-