org.jibx.schema.elements
Class FilteredSegmentList

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList
          extended by 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
FilteredSegmentList(LazyList list, long match, FilteredSegmentList prior, OpenAttrBase owner)
          Constructor with everything specified.
FilteredSegmentList(LazyList list, long match, OpenAttrBase owner)
          Constructor with no prior filter.
 
Method Summary
 void add(int index, Object element)
           
 Object get(int index)
           
 Object remove(int index)
          Removes the item at the index position.
 boolean remove(Object o)
           
protected  void removeRange(int from, int to)
           
 Object set(int index, Object element)
           
 int size()
           
 
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.List
addAll, contains, containsAll, isEmpty, removeAll, retainAll, toArray, toArray
 

Constructor Detail

FilteredSegmentList

public FilteredSegmentList(LazyList list,
                           long match,
                           FilteredSegmentList prior,
                           OpenAttrBase owner)
Constructor with everything specified.

Parameters:
list - backing list
match - included element types mask
prior - filter which comes before this one (null if none)
owner - element owning this list

FilteredSegmentList

public FilteredSegmentList(LazyList list,
                           long match,
                           OpenAttrBase owner)
Constructor with no prior filter.

Parameters:
list - backing list
match - included element types mask
owner - element owning this list
Method Detail

get

public Object get(int index)
Specified by:
get in interface List
Specified by:
get in class AbstractList

size

public int size()
Specified by:
size in interface Collection
Specified by:
size in interface List
Specified by:
size in class AbstractCollection

add

public void add(int index,
                Object element)
Specified by:
add in interface List
Overrides:
add in class AbstractList

remove

public Object remove(int index)
Removes the item at the index position.

Specified by:
remove in interface List
Overrides:
remove in class AbstractList
Parameters:
index -
Returns:
removed item

remove

public boolean remove(Object o)
Specified by:
remove in interface Collection
Specified by:
remove in interface List
Overrides:
remove in class AbstractCollection

set

public Object set(int index,
                  Object element)
Specified by:
set in interface List
Overrides:
set in class AbstractList

removeRange

protected void removeRange(int from,
                           int to)
Overrides:
removeRange in class AbstractList


Copyright © 2005-2012 jibx.org. All Rights Reserved.