public abstract class GenericShortType<T extends GenericShortType<T>> extends IntegerTypeImpl<T>
| Constructor and Description |
|---|
GenericShortType() |
GenericShortType(DirectAccessContainer<T,? extends ShortAccess> shortStorage) |
GenericShortType(short value) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(T c) |
int |
compareTo(T c) |
void |
dec() |
void |
div(T c) |
protected short |
getValue() |
void |
inc() |
void |
mul(double c) |
void |
mul(float c) |
void |
mul(T c) |
void |
set(T c)
Sets the value of another
Type. |
void |
setOne() |
protected void |
setValue(short f) |
void |
setZero() |
void |
sub(T c) |
String |
toString() |
void |
updateContainer(Cursor<?> c)
|
getDefaultDisplay, getMinIncrement, getRealDouble, getRealFloat, setReal, setRealdecIndex, decIndex, getComplexDouble, getComplexFloat, getEntitiesPerPixel, getPhaseDouble, getPhaseFloat, getPowerDouble, getPowerFloat, incIndex, incIndex, setComplex, setComplex, updateIndexcomplexConjugate, getPreferredRealPrecision, setComplexNumber, setComplexNumberclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetInteger, getIntegerLong, setInteger, setIntegergetMaxValue, getMinValuecomplexConjugate, getComplexDouble, getComplexFloat, getPhaseDouble, getPhaseFloat, getPowerDouble, getPowerFloat, getPreferredRealPrecision, setComplex, setComplex, setComplexNumber, setComplexNumbercopy, createArray1D, createArray2D, createArray3D, createSuitableDirectAccessContainer, createVariable, decIndex, decIndex, duplicateTypeOnSameDirectAccessContainer, getEntitiesPerPixel, getIndex, incIndex, incIndex, updateIndexpublic GenericShortType(DirectAccessContainer<T,? extends ShortAccess> shortStorage)
public GenericShortType(short value)
public GenericShortType()
public void updateContainer(Cursor<?> c)
TypeCursors to update the data current data array
of the Type, for example when moving from one Cell to the next.
If it is only an Array the Cursors never have to call that function.
The idea behind this concept is maybe not obvious. The Type knows which basic type
is used (float, int, byte, ...) but does not know how it is stored (Array, CellDirectAccessContainer, ...) to
prevent multiple implementations of Type.
That's why Type asks the DataAccess to give the actual basic array by passing the Cursor
that calls the method. The DataAccess is also an Array, CellDirectAccessContainer, ... which
can then communicate with the ArrayCursor, CellCursor, ... and return the current basic type array.
A typical implementation of this method looks like that (this is the FloatType implementation):
float[] v = floatStorage.getCurrentStorageArray( c );c - - the Cursor gives a link to itself so that the Type
tell its DataAccess to get the new basic type array.protected short getValue()
protected void setValue(short f)
public void mul(float c)
mul in interface NumericType<T extends GenericShortType<T>>mul in class RealTypeImpl<T extends GenericShortType<T>>public void mul(double c)
mul in interface NumericType<T extends GenericShortType<T>>mul in class RealTypeImpl<T extends GenericShortType<T>>public void add(T c)
add in interface NumericType<T extends GenericShortType<T>>add in class RealTypeImpl<T extends GenericShortType<T>>public void div(T c)
div in interface NumericType<T extends GenericShortType<T>>div in class RealTypeImpl<T extends GenericShortType<T>>public void mul(T c)
mul in interface NumericType<T extends GenericShortType<T>>mul in class RealTypeImpl<T extends GenericShortType<T>>public void sub(T c)
sub in interface NumericType<T extends GenericShortType<T>>sub in class RealTypeImpl<T extends GenericShortType<T>>public int compareTo(T c)
compareTo in interface Comparable<T extends GenericShortType<T>>compareTo in class IntegerTypeImpl<T extends GenericShortType<T>>public void set(T c)
TypeType.set in interface Type<T extends GenericShortType<T>>set in class RealTypeImpl<T extends GenericShortType<T>>c - - the new valuepublic void setOne()
setOne in interface NumericType<T extends GenericShortType<T>>setOne in class IntegerTypeImpl<T extends GenericShortType<T>>public void setZero()
setZero in interface NumericType<T extends GenericShortType<T>>setZero in class IntegerTypeImpl<T extends GenericShortType<T>>public void inc()
inc in interface RealType<T extends GenericShortType<T>>inc in class IntegerTypeImpl<T extends GenericShortType<T>>public void dec()
dec in interface RealType<T extends GenericShortType<T>>dec in class IntegerTypeImpl<T extends GenericShortType<T>>public String toString()
toString in class IntegerTypeImpl<T extends GenericShortType<T>>Copyright © 2015–2021 Fiji. All rights reserved.