uk.ac.starlink.topcat.plot
Class ConstantColumnData

java.lang.Object
  extended by uk.ac.starlink.table.ColumnData
      extended by uk.ac.starlink.topcat.plot.ConstantColumnData

public class ConstantColumnData
extends uk.ac.starlink.table.ColumnData

ColumnData implementation which always returns the same Double value. The equals and hashCode methods are implemented so that instances with the same values are equal to each other.

Since:
1 Jun 2007
Author:
Mark Taylor

Field Summary
static ConstantColumnData NAN
          Instance with values of Double.NaN.
static ConstantColumnData ONE
          Instance with values of 1.
static ConstantColumnData ZERO
          Instance with values of 0.
 
Constructor Summary
ConstantColumnData(String name, double value)
          Constructor.
 
Method Summary
 boolean equals(Object other)
           
 int hashCode()
           
 Object readValue(long irow)
           
 
Methods inherited from class uk.ac.starlink.table.ColumnData
getColumnInfo, isWritable, setColumnInfo, storeValue
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ZERO

public static final ConstantColumnData ZERO
Instance with values of 0.


ONE

public static final ConstantColumnData ONE
Instance with values of 1.


NAN

public static final ConstantColumnData NAN
Instance with values of Double.NaN.

Constructor Detail

ConstantColumnData

public ConstantColumnData(String name,
                          double value)
Constructor.

Parameters:
name - column name
value - constant column value
Method Detail

readValue

public Object readValue(long irow)
Specified by:
readValue in class uk.ac.starlink.table.ColumnData

equals

public boolean equals(Object other)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2003-2018 CCLRC: Council for the Central Laboratory of the Research Councils. All Rights Reserved.