FileDocCategorySizeDatePackage
LookupTable.javaAPI DocAndroid 1.5 API3177Wed May 06 22:41:54 BST 2009java.awt.image

LookupTable

public abstract class LookupTable extends Object
This abstract LookupTable class represents lookup table which is defined with the number of components and offset value. ByteLookupTable and ShortLookupTable classes are subclasses of LookupTable which contains byte and short data tables as an input arrays for bands or components of image.
since
Android 1.0

Fields Summary
private int
offset
The offset.
private int
numComponents
The num components.
Constructors Summary
protected LookupTable(int offset, int numComponents)
Instantiates a new LookupTable with the specified offset value and number of components.

param
offset the offset value.
param
numComponents the number of components.

        if (offset < 0) {
            // awt.232=Offset should be not less than zero
            throw new IllegalArgumentException(Messages.getString("awt.232")); //$NON-NLS-1$
        }
        if (numComponents < 1) {
            // awt.233=Number of components should be positive
            throw new IllegalArgumentException(Messages.getString("awt.233")); //$NON-NLS-1$
        }

        this.offset = offset;
        this.numComponents = numComponents;
    
Methods Summary
public intgetNumComponents()
Gets the number of components of this Lookup table.

return
the number components of this Lookup table.

        return numComponents;
    
public intgetOffset()
Gets the offset value of this Lookup table.

return
the offset value of this Lookup table.

        return offset;
    
public abstract int[]lookupPixel(int[] src, int[] dst)
Returns an integer array which contains samples of the specified pixel which is translated with the lookup table of this LookupTable. The resulted array is stored to the dst array.

param
src the source array.
param
dst the destination array where the result can be stored.
return
the integer array of translated samples of a pixel.