public interface DataType<T extends NumericType<T>> extends ImageJPlugin, Contextual, SingletonPlugin
Modifier and Type | Method and Description |
---|---|
double |
asDouble(T val)
Converts value to a double.
|
long |
asLong(T val)
Converts value to a long.
|
int |
bitCount()
Number of bits of information required to represent data in the type.
|
void |
cast(BigComplex val,
T dest)
Sets a given variable of the underlying NumericType to a value that is
closest to a given BigComplex number.
|
void |
cast(T val,
BigComplex dest)
Sets a BigComplex representation from a given variable of the underlying
NumericType.
|
T |
createVariable()
Returns a variable of the underlying NumericType wrapped by this DataType.
|
String |
description()
A fuller description that elaborates on the capabilities of the type.
|
T |
getType()
Provides an example of the underlying NumericType.
|
boolean |
hasDoubleRepresentation()
Returns true if data can be encoded in a double with no precision loss.
|
boolean |
hasLongRepresentation()
Returns true if data can be encoded in a long with no precision loss.
|
boolean |
isBounded()
Returns true if DataType is fully bounded (bounded below and bounded
above).
|
boolean |
isComplex()
Returns true if this DataType is a complex number (imaginary component is
changeable).
|
boolean |
isFloat()
Returns true if this DataType represents a floating point number.
|
boolean |
isSigned()
Returns true if this DataType represents a signed number.
|
String |
longName()
A long name useful for displaying to user.
|
void |
lowerBound(T dest)
Sets a given variable to the lower bound of the underlying NumericType.
|
void |
setDouble(T val,
double v)
Sets a given value to a given double.
|
void |
setLong(T val,
long v)
Sets a given value to a given long.
|
String |
shortName()
A short name useful for displaying to user.
|
void |
upperBound(T dest)
Sets a given variable to the upper bound of the underlying NumericType.
|
context, getContext, setContext
T getType()
String shortName()
String longName()
String description()
boolean isComplex()
boolean isFloat()
boolean isSigned()
boolean isBounded()
void lowerBound(T dest)
void upperBound(T dest)
int bitCount()
T createVariable()
void cast(T val, BigComplex dest)
void cast(BigComplex val, T dest)
boolean hasDoubleRepresentation()
boolean hasLongRepresentation()
double asDouble(T val)
long asLong(T val)
void setDouble(T val, double v)
void setLong(T val, long v)
Copyright © 2014–2022 ImageJ. All rights reserved.