Package com.basistech.rosette.dm
Class ListAttribute<Item extends BaseAttribute>
java.lang.Object
com.basistech.rosette.dm.BaseAttribute
com.basistech.rosette.dm.ListAttribute<Item>
- Type Parameters:
Item- The type of the attributes in the list.
- All Implemented Interfaces:
Serializable,Iterable<Item>,Collection<Item>,List<Item>
public class ListAttribute<Item extends BaseAttribute>
extends BaseAttribute
implements List<Item>, Serializable
A container for an ordered collection of attributes of a type.
Like all other attributes, it stores extended properties.
It is immutable and throws for attempts to use methods that would modify it.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classListAttribute.Builder<Item extends BaseAttribute>A builder for lists. -
Field Summary
Fields inherited from class com.basistech.rosette.dm.BaseAttribute
extendedProperties -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedListAttribute(Class<? extends BaseAttribute> itemClass, List<Item> items) protectedListAttribute(Class<? extends BaseAttribute> itemClass, List<Item> items, Map<String, Object> extendedProperties) -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanbooleanaddAll(int index, Collection<? extends Item> c) booleanaddAll(Collection<? extends Item> c) voidclear()booleanbooleancontainsAll(Collection<?> c) get(int index) Class<? extends BaseAttribute>Internal use method for Jackson/Json serialization.getItems()Internal use API used in Jackson serialization.intbooleanisEmpty()iterator()intlistIterator(int index) remove(int index) booleanbooleanremoveAll(Collection<?> c) booleanretainAll(Collection<?> c) intsize()subList(int fromIndex, int toIndex) Object[]toArray()<T> T[]toArray(T[] a) protected com.google.common.base.MoreObjects.ToStringHelperMethods inherited from class com.basistech.rosette.dm.BaseAttribute
getExtendedProperties, listOrNull, setExtendedProperty, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.List
equals, hashCode, replaceAll, sort, spliterator
-
Constructor Details
-
ListAttribute
-
ListAttribute
-
-
Method Details
-
getItems
Internal use API used in Jackson serialization.- Returns:
- the list itself.
-
getItemClass
Internal use method for Jackson/Json serialization.- Returns:
- the class of the items in this list.
-
size
public int size()- Specified by:
sizein interfaceCollection<Item extends BaseAttribute>- Specified by:
sizein interfaceList<Item extends BaseAttribute>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<Item extends BaseAttribute>- Specified by:
isEmptyin interfaceList<Item extends BaseAttribute>
-
contains
- Specified by:
containsin interfaceCollection<Item extends BaseAttribute>- Specified by:
containsin interfaceList<Item extends BaseAttribute>
-
iterator
- Specified by:
iteratorin interfaceCollection<Item extends BaseAttribute>- Specified by:
iteratorin interfaceIterable<Item extends BaseAttribute>- Specified by:
iteratorin interfaceList<Item extends BaseAttribute>
-
toArray
- Specified by:
toArrayin interfaceCollection<Item extends BaseAttribute>- Specified by:
toArrayin interfaceList<Item extends BaseAttribute>
-
toArray
public <T> T[] toArray(T[] a) - Specified by:
toArrayin interfaceCollection<Item extends BaseAttribute>- Specified by:
toArrayin interfaceList<Item extends BaseAttribute>
-
add
- Specified by:
addin interfaceCollection<Item extends BaseAttribute>- Specified by:
addin interfaceList<Item extends BaseAttribute>
-
remove
- Specified by:
removein interfaceCollection<Item extends BaseAttribute>- Specified by:
removein interfaceList<Item extends BaseAttribute>
-
containsAll
- Specified by:
containsAllin interfaceCollection<Item extends BaseAttribute>- Specified by:
containsAllin interfaceList<Item extends BaseAttribute>
-
addAll
- Specified by:
addAllin interfaceCollection<Item extends BaseAttribute>- Specified by:
addAllin interfaceList<Item extends BaseAttribute>
-
addAll
- Specified by:
addAllin interfaceList<Item extends BaseAttribute>
-
removeAll
- Specified by:
removeAllin interfaceCollection<Item extends BaseAttribute>- Specified by:
removeAllin interfaceList<Item extends BaseAttribute>
-
retainAll
- Specified by:
retainAllin interfaceCollection<Item extends BaseAttribute>- Specified by:
retainAllin interfaceList<Item extends BaseAttribute>
-
clear
public void clear()- Specified by:
clearin interfaceCollection<Item extends BaseAttribute>- Specified by:
clearin interfaceList<Item extends BaseAttribute>
-
get
- Specified by:
getin interfaceList<Item extends BaseAttribute>
-
set
- Specified by:
setin interfaceList<Item extends BaseAttribute>
-
add
- Specified by:
addin interfaceList<Item extends BaseAttribute>
-
remove
- Specified by:
removein interfaceList<Item extends BaseAttribute>
-
indexOf
- Specified by:
indexOfin interfaceList<Item extends BaseAttribute>
-
lastIndexOf
- Specified by:
lastIndexOfin interfaceList<Item extends BaseAttribute>
-
listIterator
- Specified by:
listIteratorin interfaceList<Item extends BaseAttribute>
-
listIterator
- Specified by:
listIteratorin interfaceList<Item extends BaseAttribute>
-
subList
- Specified by:
subListin interfaceList<Item extends BaseAttribute>
-
toStringHelper
protected com.google.common.base.MoreObjects.ToStringHelper toStringHelper()- Overrides:
toStringHelperin classBaseAttribute
-