Package org.jibx.schema.elements
Class FilteredSegmentList
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList
-
- org.jibx.schema.elements.FilteredSegmentList
-
- All Implemented Interfaces:
Iterable,Collection,List
public class FilteredSegmentList extends AbstractList
Virtual list generated from a backing list by filtering on the element types. This exposes a segment of the backing list through the filter, with multiple filters used to expose the entire backing list piecemeal. It can only be used with lists of elements.- Author:
- Dennis M. Sosnoski
-
-
Field Summary
-
Fields inherited from class java.util.AbstractList
modCount
-
-
Constructor Summary
Constructors Constructor Description FilteredSegmentList(org.jibx.util.LazyList list, long match, FilteredSegmentList prior, OpenAttrBase owner)Constructor with everything specified.FilteredSegmentList(org.jibx.util.LazyList list, long match, OpenAttrBase owner)Constructor with no prior filter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(int index, Object element)Objectget(int index)Objectremove(int index)Removes the item at the index position.booleanremove(Object o)protected voidremoveRange(int from, int to)Objectset(int index, Object element)intsize()-
Methods inherited from class java.util.AbstractList
add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, subList
-
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, removeAll, retainAll, toArray, toArray, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.List
addAll, contains, containsAll, isEmpty, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
-
-
-
-
Constructor Detail
-
FilteredSegmentList
public FilteredSegmentList(org.jibx.util.LazyList list, long match, FilteredSegmentList prior, OpenAttrBase owner)Constructor with everything specified.- Parameters:
list- backing listmatch- included element types maskprior- filter which comes before this one (nullif none)owner- element owning this list
-
FilteredSegmentList
public FilteredSegmentList(org.jibx.util.LazyList list, long match, OpenAttrBase owner)Constructor with no prior filter.- Parameters:
list- backing listmatch- included element types maskowner- element owning this list
-
-
Method Detail
-
get
public Object get(int index)
- Specified by:
getin interfaceList- Specified by:
getin classAbstractList
-
size
public int size()
- Specified by:
sizein interfaceCollection- Specified by:
sizein interfaceList- Specified by:
sizein classAbstractCollection
-
add
public void add(int index, Object element)- Specified by:
addin interfaceList- Overrides:
addin classAbstractList
-
remove
public Object remove(int index)
Removes the item at the index position.- Specified by:
removein interfaceList- Overrides:
removein classAbstractList- Parameters:
index- of item to remove- Returns:
- removed item
-
remove
public boolean remove(Object o)
- Specified by:
removein interfaceCollection- Specified by:
removein interfaceList- Overrides:
removein classAbstractCollection
-
set
public Object set(int index, Object element)
- Specified by:
setin interfaceList- Overrides:
setin classAbstractList
-
removeRange
protected void removeRange(int from, int to)- Overrides:
removeRangein classAbstractList
-
-