com.tonbeller.jpivot.olap.model.impl
Class PositionSpan

java.lang.Object
  extended by com.tonbeller.jpivot.olap.model.impl.PositionSpan

public class PositionSpan
extends java.lang.Object

finds a group (span) of positions that are related in terms of a start position and a member. The group consists of the positions before and after the start position, that share equal members on the member's level and on the higher levels.

Example 1: returns the first 2 positions. A's and I's are equal within the group

 A I U  <- start position, member = I
 A I V
 A J U
 A J V
 

Example 2: returns the first 2 positions. A's and I's are equal within the group

 A I U  
 A I V  <- start position, member = I
 B I U
 B I V
 


Constructor Summary
PositionSpan(Axis axis, Position position, Member member)
          Constructor for PositionSpan.
 
Method Summary
 Axis getAxis()
          Returns the axis.
 int getEndIndex()
          Returns (index + 1) of the last matching position
 Member getMember()
          Returns the member.
 int getMemberIndex()
          Returns the index of member in positions
 Position getPosition()
          Returns the position.
 int getStartIndex()
          Returns the index of the first matching position
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PositionSpan

public PositionSpan(Axis axis,
                    Position position,
                    Member member)
Constructor for PositionSpan.

Method Detail

getAxis

public Axis getAxis()
Returns the axis.

Returns:
Axis

getEndIndex

public int getEndIndex()
Returns (index + 1) of the last matching position

Returns:
int

getMember

public Member getMember()
Returns the member.

Returns:
Member

getPosition

public Position getPosition()
Returns the position.

Returns:
Position

getStartIndex

public int getStartIndex()
Returns the index of the first matching position

Returns:
int

getMemberIndex

public int getMemberIndex()
Returns the index of member in positions

Returns:
int