Package uk.ac.starlink.topcat.plot

# Class ConstantColumnData

java.lang.Object
uk.ac.starlink.table.ColumnData
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

Fields
Modifier and Type
Field
Description
`static final ConstantColumnData`
`NAN`
Instance with values of Double.NaN.
`static final ConstantColumnData`
`ONE`
Instance with values of 1.
`static final ConstantColumnData`
`ZERO`
Instance with values of 0.

## Constructor Summary

Constructors
Constructor
Description
`ConstantColumnData(String name, double value)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`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 Details

### 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 Details

### ConstantColumnData

public ConstantColumnData(String name, double value)
Constructor.

Parameters:
  `name` - column name
  `value` - constant column value

## Method Details

### 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`