mondrian.rolap
Class RolapAxis.MemberIterable.PositionWrapper

java.lang.Object
  extended by mondrian.util.UnsupportedList<Position>
      extended by mondrian.rolap.RolapAxis.PositionListUnsupported
          extended by mondrian.rolap.RolapAxis.MemberIterable.PositionWrapper
All Implemented Interfaces:
java.lang.Iterable<Position>, java.util.Collection<Position>, java.util.List<Position>
Enclosing class:
RolapAxis.MemberIterable

 class RolapAxis.MemberIterable.PositionWrapper
extends RolapAxis.PositionListUnsupported

This List<Position> starts life with a List<Position> implementation that is based upon an non-List (Iterable). If all accesses are simply through iteration, then the initial implementation remains, but if the client uses either the 'size' or 'get' methods then the Iterable is materialized into a List.


Nested Class Summary
 
Nested classes/interfaces inherited from class mondrian.util.UnsupportedList
UnsupportedList.Itr, UnsupportedList.ItrUnknownSize, UnsupportedList.ListItr
 
Field Summary
(package private)  java.util.List<Position> positionList
           
 
Constructor Summary
RolapAxis.MemberIterable.PositionWrapper()
           
 
Method Summary
 Position get(int index)
           
 java.util.Iterator<Position> iterator()
           
protected  void materialize()
           
 int size()
           
 
Methods inherited from class mondrian.util.UnsupportedList
add, add, addAll, addAll, clear, contains, containsAll, equals, hashCode, indexOf, isEmpty, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, subList, toArray, toArray
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

positionList

java.util.List<Position> positionList
Constructor Detail

RolapAxis.MemberIterable.PositionWrapper

RolapAxis.MemberIterable.PositionWrapper()
Method Detail

materialize

protected void materialize()

size

public int size()
Specified by:
size in interface java.util.Collection<Position>
Specified by:
size in interface java.util.List<Position>
Overrides:
size in class UnsupportedList<Position>

get

public Position get(int index)
Specified by:
get in interface java.util.List<Position>
Overrides:
get in class UnsupportedList<Position>

iterator

public java.util.Iterator<Position> iterator()
Specified by:
iterator in interface java.lang.Iterable<Position>
Specified by:
iterator in interface java.util.Collection<Position>
Specified by:
iterator in interface java.util.List<Position>
Overrides:
iterator in class UnsupportedList<Position>

Get Mondrian at SourceForge.net. Fast, secure and free Open Source software downloads