Package uk.ac.starlink.array

# Class DummyNDArray

java.lang.Object
uk.ac.starlink.array.DefaultArrayDescription
uk.ac.starlink.array.BridgeNDArray
uk.ac.starlink.array.DummyNDArray

All Implemented Interfaces:
  `ArrayDescription`, `NDArray`

public class DummyNDArray extends BridgeNDArray
NDArray backed by no data. It is read-only, and all its pixels have the bad value. It may be used as a source of bad values, or as a place-holder where an NDArray of a certain shape and type is required but whose data is not needed.

For a more flexible no-data array use the `DeterministicArrayImpl` class (or write your own).

Author:
  Mark Taylor (Starlink)
See Also:
  - `DeterministicArrayImpl`

## Field Summary

### Fields inherited from class uk.ac.starlink.array.DefaultArrayDescription

`arrayDims, arrayHandler, arrayIsRandom, arrayIsReadable, arrayIsWritable, arrayNdim, arrayNpix, arrayOrder, arrayOrigin, arrayShape, arrayType`

## Constructor Summary

Constructors
Constructor
Description
`DummyNDArray(NDArray nda)`
Constructs a new DummyNDArray with the same characteristics (pixel sequence, type and bad value handler) as a template NDArray.
`DummyNDArray(NDShape shape, Type type)`
Constructs a new DummyNDArray with a given shape and type and default pixel sequence and bad value.
`DummyNDArray(OrderedNDShape oshape, Type type, BadHandler bh)`
Constructs a new DummyNDArray with a given shape and type and bad value handler.

## Method Summary

### Methods inherited from class uk.ac.starlink.array.BridgeNDArray

`close, getAccess, getImpl, getURL, multipleAccess, toString`

### Methods inherited from class uk.ac.starlink.array.DefaultArrayDescription

`getBadHandler, getShape, getType, isRandom, isReadable, isWritable`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface uk.ac.starlink.array.ArrayDescription

`getBadHandler, getShape, getType, isRandom, isReadable, isWritable`

## Constructor Details

### DummyNDArray

public DummyNDArray(OrderedNDShape oshape, Type type, BadHandler bh)
Constructs a new DummyNDArray with a given shape and type and bad value handler. By setting the bad value handler appropriately, the primitive value that the array returns can be modified.

Parameters:
  `oshape` - the pixel sequence
  `type` - the numeric type
  `bh` - the bad value handler

### DummyNDArray

public DummyNDArray(NDShape shape, Type type)
Constructs a new DummyNDArray with a given shape and type and default pixel sequence and bad value.

Parameters:
  `shape` - the shape
  `type` - the numeric type

### DummyNDArray

public DummyNDArray(NDArray nda)
Constructs a new DummyNDArray with the same characteristics (pixel sequence, type and bad value handler) as a template NDArray.

Parameters:
  `nda` - template NDArray