Class VolatileByteType
- All Implemented Interfaces:
Comparable<VolatileByteType>, NativeType<VolatileByteType>, ComplexType<VolatileByteType>, NumericType<VolatileByteType>, RealType<VolatileByteType>, Add<VolatileByteType>, Div<VolatileByteType>, Mul<VolatileByteType>, MulFloatingPoint, Pow<VolatileByteType>, PowFloatingPoint, SetOne, SetZero, Sub<VolatileByteType>, ValueEquals<VolatileByteType>, Type<VolatileByteType>
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final NativeImg<?, ? extends VolatileByteAccess> private static final NativeTypeFactory<VolatileByteType, VolatileByteAccess> -
Constructor Summary
ConstructorsConstructorDescriptionVolatileByteType(byte value) VolatileByteType(VolatileByteAccess access) VolatileByteType(NativeImg<?, ? extends VolatileByteAccess> img) -
Method Summary
Modifier and TypeMethodDescriptioncopy()Creates a newTypevariable which can only store one value.Creates a newNativeTypewhich stores in the same physical array.voidset(byte value) voidThis method is used by an accessor (e.g., aCursor) to request an update of the current data array.Methods inherited from class AbstractVolatileNativeRealType
getEntitiesPerPixel, indexMethods inherited from class AbstractVolatileRealType
add, compareTo, complexConjugate, dec, div, equals, getBitsPerPixel, getImaginaryDouble, getImaginaryFloat, getMaxValue, getMinIncrement, getMinValue, getPhaseDouble, getPhaseFloat, getPowerDouble, getPowerFloat, getRealDouble, getRealFloat, hashCode, inc, mul, mul, mul, pow, pow, set, setComplexNumber, setComplexNumber, setImaginary, setImaginary, setOne, setReal, setReal, setZero, sub, valueEqualsMethods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface NativeType
decIndex, decIndex, getIndex, incIndex, incIndex, updateIndexMethods inherited from interface ValueEquals
valueEquals
-
Field Details
-
img
-
typeFactory
-
-
Constructor Details
-
VolatileByteType
-
VolatileByteType
-
VolatileByteType
public VolatileByteType(byte value) -
VolatileByteType
public VolatileByteType()
-
-
Method Details
-
set
public void set(byte value) -
updateContainer
Description copied from interface:NativeTypeThis method is used by an accessor (e.g., aCursor) to request an update of the current data array.As an example consider a
CellCursormoving on aCellImg. The cursor maintains aNativeTypewhich provides access to the image data. When the cursor moves from one cell to the next, the underlying data array of theNativeTypemust be switched to the data array of the new cell.To achieve this, the
CellCursorcallsupdateContainer()with itself as the argument.updateContainer()in turn will callNativeImg.update(Object)on it's container, passing along the reference to the cursor. In this example, the container would be aCellImg. While theNativeTypedoes not know about the type of the cursor, the container does.CellImgknows that it is passed aCellCursorinstance, which can be used to figure out the current cell and the underlying data array, which is then returned to theNativeType.The idea behind this concept is maybe not obvious. The
NativeTypeknows which basic type is used (float, int, byte, ...). However, it does not know how the data is stored (ArrayImg,CellImg, ...). This prevents the need for multiple implementations ofNativeType.- Parameters:
c- reference to an accessor which can be passed on to the container (which will know what to do with it).
-
duplicateTypeOnSameNativeImg
Description copied from interface:NativeTypeCreates a newNativeTypewhich stores in the same physical array. This is only used internally.- Returns:
- a new
NativeTypeinstance working on the sameNativeImg
-
createVariable
-
copy
-
getNativeTypeFactory
-