public class Requirements extends Object implements Cloneable
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 and Description |
---|
Requirements()
Constructs a Requirements object with no specifications.
|
Requirements(AccessMode mode)
Constructs a Requirements object specifying a given access mode.
|
Modifier and Type | Method and Description |
---|---|
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() |
public Requirements()
public Requirements(AccessMode mode)
public Type getType()
public Requirements setType(Type type)
type
- the required data typepublic NDShape getWindow()
public Requirements setWindow(NDShape window)
window
- the required windowpublic Order getOrder()
public Requirements setOrder(Order order)
order
- the required orderingpublic Requirements setShape(OrderedNDShape oshape)
setWindow
and setOrder
in one go.oshape
- the ordered shape (or equivalently, pixel sequence)
requiredpublic BadHandler getBadHandler()
public Requirements setBadHandler(BadHandler handler)
handler.getType()==this.getType()
).handler
- the required handlerIllegalStateException
- if no type has been setIllegalArgumentException
- 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 useIllegalStateException
- if no type has been setIllegalArgumentException
- 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 modepublic Object clone()
Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.