edu.uiuc.ge.illigal.gale.data
Class DataView

java.lang.Object
  |
  +--edu.uiuc.ge.illigal.gale.data.DataView
All Implemented Interfaces:
OrderedSet

public class DataView
extends java.lang.Object
implements OrderedSet

This class is a view over a certain InstanceMemory.

Since:
0.9alpha
Version:
0.9alpha
Author:
Xavier Llorà <xllora@illigal.ge.uiuc.edu>

Field Summary
private  int iLowerBound
          The Lower Bound of the view
private  int iSize
          The number of instances in the view (calculated field)
private  int iUpperBound
          The Upper Bound of the view
private  edu.uiuc.ge.illigal.gale.data.OrderedSet osData
          The Ordered data set
 
Constructor Summary
DataView(edu.uiuc.ge.illigal.gale.data.OrderedSet os, int iLb, int iUb)
          Builds a view over the OrderSet given.
 
Method Summary
 edu.uiuc.ge.illigal.gale.data.Instance getInstance(int iPos)
          Returns the instance for the given position
 int getSize()
          Returns the number of instances in the OrderedSet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

iLowerBound

private int iLowerBound
The Lower Bound of the view


iUpperBound

private int iUpperBound
The Upper Bound of the view


osData

private edu.uiuc.ge.illigal.gale.data.OrderedSet osData
The Ordered data set


iSize

private int iSize
The number of instances in the view (calculated field)

Constructor Detail

DataView

public DataView(edu.uiuc.ge.illigal.gale.data.OrderedSet os,
                int iLb,
                int iUb)
Builds a view over the OrderSet given.

Parameters:
os - The ordered set that contains the data
iLb - The lower bound of the view
iUb - The upper bound of the view
Method Detail

getInstance

public edu.uiuc.ge.illigal.gale.data.Instance getInstance(int iPos)
Description copied from interface: OrderedSet
Returns the instance for the given position

Specified by:
getInstance in interface OrderedSet
Parameters:
iPos - Index of the requested instance
Returns:
The value of the requested index

getSize

public int getSize()
Description copied from interface: OrderedSet
Returns the number of instances in the OrderedSet

Specified by:
getSize in interface OrderedSet
Returns:
The number of instances