org.systemsbiology.gaggle.experiment.gui.vectormath
Class ReadOnlyVectorDataAdapter

java.lang.Object
  extended by org.systemsbiology.gaggle.experiment.gui.vectormath.ReadOnlyVectorDataAdapter
All Implemented Interfaces:
ReadOnlyVectorDataProvider
Direct Known Subclasses:
VectorDataAdapter

public class ReadOnlyVectorDataAdapter
extends java.lang.Object
implements ReadOnlyVectorDataProvider

This class provides a default implementation of the ReadOnlyVectorDataProvider interface. The purpose of this class is for constructing anonymous inner classes to implement a ReadOnlyVectorDataProvider; the anonymous class should override all the methods. For example: final List theData = myData; ReadOnlyVectorDataProvider p = new ReadOnlyVectorDataAdapter() { public int size() {return theData.size();} public double getQuick(int index) {return ((Double)theData.get(index)).doubleValue();} }; ReadOnlyMathVector vector = MathVectorFactory.makeReadOnlyVector(p);


Constructor Summary
ReadOnlyVectorDataAdapter()
           
 
Method Summary
 double getQuick(int index)
          Unchecked access to the double value at the specified index.
 int size()
          Returns the number of elements
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReadOnlyVectorDataAdapter

public ReadOnlyVectorDataAdapter()
Method Detail

size

public int size()
Description copied from interface: ReadOnlyVectorDataProvider
Returns the number of elements

Specified by:
size in interface ReadOnlyVectorDataProvider

getQuick

public double getQuick(int index)
Description copied from interface: ReadOnlyVectorDataProvider
Unchecked access to the double value at the specified index.

Specified by:
getQuick in interface ReadOnlyVectorDataProvider