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
Modifier and TypeClassDescriptionstatic class
ListAttribute.Builder<Item extends BaseAttribute>
A builder for lists. -
Field Summary
Fields inherited from class com.basistech.rosette.dm.BaseAttribute
extendedProperties
-
Constructor Summary
ModifierConstructorDescriptionprotected
ListAttribute
(Class<? extends BaseAttribute> itemClass, List<Item> items) protected
ListAttribute
(Class<? extends BaseAttribute> itemClass, List<Item> items, Map<String, Object> extendedProperties) -
Method Summary
Modifier and TypeMethodDescriptionvoid
boolean
boolean
addAll
(int index, Collection<? extends Item> c) boolean
addAll
(Collection<? extends Item> c) void
clear()
boolean
boolean
containsAll
(Collection<?> c) get
(int index) Class<? extends BaseAttribute>
Internal use method for Jackson/Json serialization.getItems()
Internal use API used in Jackson serialization.int
boolean
isEmpty()
iterator()
int
listIterator
(int index) remove
(int index) boolean
boolean
removeAll
(Collection<?> c) boolean
retainAll
(Collection<?> c) int
size()
subList
(int fromIndex, int toIndex) Object[]
toArray()
<T> T[]
toArray
(T[] a) protected com.google.common.base.MoreObjects.ToStringHelper
Methods inherited from class com.basistech.rosette.dm.BaseAttribute
getExtendedProperties, listOrNull, setExtendedProperty, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods 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:
size
in interfaceCollection<Item extends BaseAttribute>
- Specified by:
size
in interfaceList<Item extends BaseAttribute>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceCollection<Item extends BaseAttribute>
- Specified by:
isEmpty
in interfaceList<Item extends BaseAttribute>
-
contains
- Specified by:
contains
in interfaceCollection<Item extends BaseAttribute>
- Specified by:
contains
in interfaceList<Item extends BaseAttribute>
-
iterator
- Specified by:
iterator
in interfaceCollection<Item extends BaseAttribute>
- Specified by:
iterator
in interfaceIterable<Item extends BaseAttribute>
- Specified by:
iterator
in interfaceList<Item extends BaseAttribute>
-
toArray
- Specified by:
toArray
in interfaceCollection<Item extends BaseAttribute>
- Specified by:
toArray
in interfaceList<Item extends BaseAttribute>
-
toArray
public <T> T[] toArray(T[] a) - Specified by:
toArray
in interfaceCollection<Item extends BaseAttribute>
- Specified by:
toArray
in interfaceList<Item extends BaseAttribute>
-
add
- Specified by:
add
in interfaceCollection<Item extends BaseAttribute>
- Specified by:
add
in interfaceList<Item extends BaseAttribute>
-
remove
- Specified by:
remove
in interfaceCollection<Item extends BaseAttribute>
- Specified by:
remove
in interfaceList<Item extends BaseAttribute>
-
containsAll
- Specified by:
containsAll
in interfaceCollection<Item extends BaseAttribute>
- Specified by:
containsAll
in interfaceList<Item extends BaseAttribute>
-
addAll
- Specified by:
addAll
in interfaceCollection<Item extends BaseAttribute>
- Specified by:
addAll
in interfaceList<Item extends BaseAttribute>
-
addAll
- Specified by:
addAll
in interfaceList<Item extends BaseAttribute>
-
removeAll
- Specified by:
removeAll
in interfaceCollection<Item extends BaseAttribute>
- Specified by:
removeAll
in interfaceList<Item extends BaseAttribute>
-
retainAll
- Specified by:
retainAll
in interfaceCollection<Item extends BaseAttribute>
- Specified by:
retainAll
in interfaceList<Item extends BaseAttribute>
-
clear
public void clear()- Specified by:
clear
in interfaceCollection<Item extends BaseAttribute>
- Specified by:
clear
in interfaceList<Item extends BaseAttribute>
-
get
- Specified by:
get
in interfaceList<Item extends BaseAttribute>
-
set
- Specified by:
set
in interfaceList<Item extends BaseAttribute>
-
add
- Specified by:
add
in interfaceList<Item extends BaseAttribute>
-
remove
- Specified by:
remove
in interfaceList<Item extends BaseAttribute>
-
indexOf
- Specified by:
indexOf
in interfaceList<Item extends BaseAttribute>
-
lastIndexOf
- Specified by:
lastIndexOf
in interfaceList<Item extends BaseAttribute>
-
listIterator
- Specified by:
listIterator
in interfaceList<Item extends BaseAttribute>
-
listIterator
- Specified by:
listIterator
in interfaceList<Item extends BaseAttribute>
-
subList
- Specified by:
subList
in interfaceList<Item extends BaseAttribute>
-
toStringHelper
protected com.google.common.base.MoreObjects.ToStringHelper toStringHelper()- Overrides:
toStringHelper
in classBaseAttribute
-