polyglot.util
Class CachingTransformingList

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList
          extended by polyglot.util.TransformingList
              extended by polyglot.util.CachingTransformingList
All Implemented Interfaces:
java.lang.Iterable, java.util.Collection, java.util.List

public class CachingTransformingList
extends TransformingList

This subclass of TransformingList applies the transformation to each element of the underlying list at most once.


Field Summary
 
Fields inherited from class polyglot.util.TransformingList
trans, underlying
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
CachingTransformingList(java.util.Collection underlying, Transformation trans)
           
CachingTransformingList(java.util.List underlying, Transformation trans)
           
 
Method Summary
 java.lang.Object get(int index)
           
 
Methods inherited from class polyglot.util.TransformingList
size
 
Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
 
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, 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, remove, removeAll, retainAll, toArray, toArray
 

Constructor Detail

CachingTransformingList

public CachingTransformingList(java.util.Collection underlying,
                               Transformation trans)

CachingTransformingList

public CachingTransformingList(java.util.List underlying,
                               Transformation trans)
Method Detail

get

public java.lang.Object get(int index)
Specified by:
get in interface java.util.List
Overrides:
get in class TransformingList