mondrian.rolap
Class RolapAxis.MemberArrayIterable.PositionWrapper

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

 class RolapAxis.MemberArrayIterable.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)  List<Position> positionList
           
 
Constructor Summary
RolapAxis.MemberArrayIterable.PositionWrapper()
           
 
Method Summary
 Position get(int index)
           
 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

List<Position> positionList
Constructor Detail

RolapAxis.MemberArrayIterable.PositionWrapper

RolapAxis.MemberArrayIterable.PositionWrapper()
Method Detail

materialize

protected void materialize()

size

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

get

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

iterator

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

SourceForge.net_Logo