kcl.waterloo.graphics.data
Class GJBigDecimalDataVector
- java.lang.Object
-
- kcl.waterloo.observable.GJAbstractObservable
-
- kcl.waterloo.graphics.data.GJAbstractDataVector<java.math.BigDecimal[]>
-
- kcl.waterloo.graphics.data.GJBigDecimalDataVector
-
- All Implemented Interfaces:
- java.beans.PropertyChangeListener, java.util.EventListener, GJDataVectorInterface<java.math.BigDecimal[]>, GJLinkableInterface, GJObservableInterface
public final class GJBigDecimalDataVector extends GJAbstractDataVector<java.math.BigDecimal[]>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface kcl.waterloo.graphics.data.GJDataVectorInterface
GJDataVectorInterface.AXIS
-
-
Constructor Summary
Constructors Constructor and Description GJBigDecimalDataVector()Used for JUnit tests
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description double[]getDataValues(GJDataTransformInterface transform)Returns the data as an IEEE double precision array transformed by the class specified bygetTranformintgetDimension()Length of the vector in the DataBufferdouble[]getRawDataValues()Returns the data as an IEEE double precision array without applying a transformvoidsetDataBuffer(java.math.BigDecimal[] buffer)Override superclasssetDataBuffermethod.voidsetDataBufferData(java.util.AbstractList<? extends java.lang.Number> v)Sets the vector in the DataBuffer to thevalues in the input.voidsetDataBufferData(java.math.BigDecimal[] v)voidsetDataBufferData(double[] v)Sets the vector in the DataBuffer to thevalues in the input.voidsetDataBufferData(int[] v)Sets the vector in the DataBuffer to thevalues in the input.voidsetEntry(int index, java.math.BigDecimal val)voidsetEntry(int index, double val)Sets a value in the DataBuffer This method should fire a PropertyChangeEvent when the buffer data are changed-
Methods inherited from class kcl.waterloo.graphics.data.GJAbstractDataVector
clearDataBufferData, getBufferClass, getCategories, getCategory, getDataBuffer, getEntry, getName, isCategorical, propertyChange, setCategories, setCategories, setCategory, setDataBuffer, setDataBufferData, setName
-
Methods inherited from class kcl.waterloo.observable.GJAbstractObservable
addLink, addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, getLinks, getPCS, getPropertyChangeListeners, getPropertyChangeListeners, hasListeners, hasSelfListener, removeLink, removePropertyChangeListener, removePropertyChangeListener, setLinks
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface kcl.waterloo.observable.GJObservableInterface
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, getPropertyChangeListeners, getPropertyChangeListeners, hasListeners, hasSelfListener, removePropertyChangeListener, removePropertyChangeListener
-
-
-
-
Method Detail
-
setDataBufferData
public final void setDataBufferData(double[] v)
Sets the vector in the DataBuffer to thevalues in the input. Data may be cast and lose precision in the copy process. This method should fire a PropertyChangeEvent when the buffer data are changed- Parameters:
v- a double[] which will be deep copied to a Double[] as the data buffer
-
setDataBufferData
public final void setDataBufferData(int[] v)
Sets the vector in the DataBuffer to thevalues in the input. Data may be cast and lose precision in the copy process. This method should fire a PropertyChangeEvent when the buffer data are changed- Parameters:
v- an int[] which will be copied to a BigDecimal[] as the data buffer
-
setDataBufferData
public final void setDataBufferData(java.math.BigDecimal[] v)
-
setDataBufferData
public final void setDataBufferData(java.util.AbstractList<? extends java.lang.Number> v)
Sets the vector in the DataBuffer to thevalues in the input. Data may be cast and lose precision in the copy process. This method should fire a PropertyChangeEvent when the buffer data are changed- Parameters:
v- an AbstractList extends Number>, values from which which will be deep copied to a BigDecimal[] as the data buffer.
-
setEntry
public final void setEntry(int index, double val)Description copied from interface:GJDataVectorInterfaceSets a value in the DataBuffer This method should fire a PropertyChangeEvent when the buffer data are changedval- the new value as double
-
setEntry
public final void setEntry(int index, java.math.BigDecimal val)
-
setDataBuffer
public final void setDataBuffer(java.math.BigDecimal[] buffer)
Override superclasssetDataBuffermethod. Needed for XMLCoder - BigDecimal not supported otherwise.- Parameters:
buffer- BigDecimal[] with the data
-
getDataValues
public final double[] getDataValues(GJDataTransformInterface transform)
Returns the data as an IEEE double precision array transformed by the class specified bygetTranform- Returns:
- a double[]
-
getRawDataValues
public final double[] getRawDataValues()
Returns the data as an IEEE double precision array without applying a transform- Returns:
- a double[]
-
getDimension
public final int getDimension()
Length of the vector in the DataBuffer- Returns:
- the length of the vector
-
-
DMelt 3.0 © DataMelt by jWork.ORG