Package net.imglib2.type.volatiles
Class AbstractVolatileNumericType<N extends NumericType<N>,T extends AbstractVolatileNumericType<N,T>>
- java.lang.Object
-
- net.imglib2.Volatile<N>
-
- net.imglib2.type.volatiles.AbstractVolatileNumericType<N,T>
-
- Type Parameters:
N
- wrappedNumericType
.T
- type of derived concrete class.
- All Implemented Interfaces:
NumericType<T>
,Add<T>
,Div<T>
,Mul<T>
,MulFloatingPoint
,SetOne
,SetZero
,Sub<T>
,ValueEquals<T>
,Type<T>
- Direct Known Subclasses:
VolatileNumericType
public abstract class AbstractVolatileNumericType<N extends NumericType<N>,T extends AbstractVolatileNumericType<N,T>> extends Volatile<N> implements NumericType<T>
Abstract base class forVolatileNumericType
s that wrap aNumericType
that is either VALID or INVALID.- Author:
- Stephan Saalfeld
-
-
Constructor Summary
Constructors Constructor Description AbstractVolatileNumericType(N t)
AbstractVolatileNumericType(N t, boolean valid)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(T c)
void
div(T c)
void
mul(double c)
void
mul(float c)
void
mul(T c)
void
set(T c)
Sets the value of anotherType
.void
setOne()
void
setZero()
void
sub(T c)
boolean
valueEquals(T other)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.imglib2.type.Type
copy, createVariable
-
-
-
-
Method Detail
-
set
public void set(T c)
Description copied from interface:Type
Sets the value of anotherType
.- Specified by:
set
in interfaceType<N extends NumericType<N>>
- Parameters:
c
- the new value
-
mul
public void mul(float c)
- Specified by:
mul
in interfaceMulFloatingPoint
-
mul
public void mul(double c)
- Specified by:
mul
in interfaceMulFloatingPoint
-
valueEquals
public boolean valueEquals(T other)
- Specified by:
valueEquals
in interfaceValueEquals<N extends NumericType<N>>
-
-