public class Slice extends Object
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
constrained
Indicate that this slice's first/last/stride were
specifically set; typically from a constraint.
|
static long |
MAXLENGTH |
static long |
UNDEFINED |
| Constructor and Description |
|---|
Slice() |
Slice(long first,
long last,
long stride) |
Slice(Slice s) |
| Modifier and Type | Method and Description |
|---|---|
Slice |
complete(DapDimension dim) |
static Slice |
compose(Slice target,
Slice src)
Take two slices and compose src wrt target
Assume neither argument is null.
|
boolean |
equals(Object o)
Compare two slices for equality
|
Slice |
fill(DapDimension dim) |
long |
getCount()
Compute the number of elements int
the slice.
|
long |
getFirst() |
long |
getLast() |
long |
getStride() |
boolean |
incomplete() |
Boolean |
isConstrained() |
Boolean |
isWhole() |
Slice |
setConstrained(Boolean tf) |
Slice |
setIndices(long first,
long last,
long stride) |
Slice |
setWhole(Boolean tf) |
Slice |
setWholeWRT(long maxsize) |
String |
toConstraintString()
Convert this slice to a bracketed string
suitable for use in a constraint
|
String |
toString() |
Slice |
validate()
Perform sanity checks on a slice
|
public static final long UNDEFINED
public static final long MAXLENGTH
protected boolean constrained
public Slice()
public Slice(long first,
long last,
long stride)
throws DapException
DapExceptionpublic Slice(Slice s) throws DapException
DapExceptionpublic long getFirst()
public long getLast()
public long getStride()
public Slice complete(DapDimension dim)
public Slice fill(DapDimension dim) throws DapException
DapExceptionpublic Slice setIndices(long first, long last, long stride) throws DapException
DapExceptionpublic Boolean isWhole()
public Slice setWholeWRT(long maxsize)
public Boolean isConstrained()
public boolean incomplete()
public long getCount()
public boolean equals(Object o)
public String toConstraintString()
public static Slice compose(Slice target, Slice src) throws DapException
target - src - DapExceptionpublic Slice validate() throws DapException
DapException - if slice is malformedCopyright © 1999–2014 UCAR/Unidata. All rights reserved.