|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.array.Requirements
public class Requirements
Specifies a set of requirements for an array object. A Requirements object may be passed to a constructor or factory method which returns an array object to indicate some required characteristics of the returned array. In general, any fields which are filled in constitute a requirement for the given attribute, while a null (or false) value indicates that the given attribute is not required; if the method/constructor in question cannot comply it should throw an exception rather than return an object lacking any of the requirements.
The attributes which may be stipulated are as follows:
mode
requirement is slightly different from the others;
it is examined
by some methods to determine the use to which the resulting
array object will be put, and controls whether data is copied
from a source into it on return, or copied out of it to a sink at
close time.
The attribute setter methods are declared to return the Requirements object itself for convenience so that settings may be chained.
Constructor Summary | |
---|---|
Requirements()
Constructs a Requirements object with no specifications. |
|
Requirements(AccessMode mode)
Constructs a Requirements object specifying a given access mode. |
Method Summary | |
---|---|
Object |
clone()
Provides a snapshot of this object; modifying the returned object will not affect the object from which it was cloned. |
BadHandler |
getBadHandler()
Gets this object's required bad value handler. |
AccessMode |
getMode()
Gets an object indicating the use to which the required array will be put. |
Order |
getOrder()
Gets this object's required pixel ordering scheme. |
boolean |
getRandom()
Gets a flag indicating whether random access is required. |
Type |
getType()
Gets this object's required data type. |
NDShape |
getWindow()
Gets this object's required window; the shape it must have. |
Requirements |
setBadHandler(BadHandler handler)
Sets this object's required bad value handler. |
Requirements |
setBadValue(Number badValue)
Sets this object's required bad value handler to be one with a given bad value. |
Requirements |
setMode(AccessMode mode)
Sets an object indicating the use to which the required array will be put. |
Requirements |
setOrder(Order order)
Sets this object's required pixel ordering scheme. |
Requirements |
setRandom(boolean random)
Sets a flag indicating whether random access is required. |
Requirements |
setShape(OrderedNDShape oshape)
Sets this object's required ordered shape (pixel sequence). |
Requirements |
setType(Type type)
Sets this object's required data type. |
Requirements |
setWindow(NDShape window)
Sets this object's required window; the shape it must have. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Requirements()
public Requirements(AccessMode mode)
Method Detail |
---|
public Type getType()
public Requirements setType(Type type)
type
- the required data type
public NDShape getWindow()
public Requirements setWindow(NDShape window)
window
- the required window
public Order getOrder()
public Requirements setOrder(Order order)
order
- the required ordering
public Requirements setShape(OrderedNDShape oshape)
oshape
- the ordered shape (or equivalently, pixel sequence)
required
public BadHandler getBadHandler()
public Requirements setBadHandler(BadHandler handler)
handler.getType()==this.getType()
).
handler
- the required handler
IllegalStateException
- if no type has been set
IllegalArgumentException
- if the type of handler
does not match the type of this objectpublic Requirements setBadValue(Number badValue)
setBadHandler(BadHandler.getHandler(getType(),badValue))It may only be called if the type has already been set.
badValue
- the bad value which the required bad value handler
must use
IllegalStateException
- if no type has been set
IllegalArgumentException
- if the type of badValue
does not match the reqired type of this objectpublic boolean getRandom()
public Requirements setRandom(boolean random)
random
- whether random access will be requiredpublic AccessMode getMode()
public Requirements setMode(AccessMode mode)
mode
- the required access mode
public Object clone()
clone
in class Object
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |