Android APIs
public final class

BlackLevelPattern

extends Object
java.lang.Object
   ↳ android.hardware.camera2.params.BlackLevelPattern

Class Overview

Immutable class to store a 4-element vector of integers corresponding to a 2x2 pattern of color channel offsets used for the black level offsets of each color channel.

Summary

Constants
int COUNT The number of offsets in this vector.
Public Methods
void copyTo(int[] destination, int offset)
Copy the ColorChannel offsets into the destination vector.
boolean equals(Object obj)
Check if this BlackLevelPattern is equal to another BlackLevelPattern.
int getOffsetForIndex(int column, int row)
Return the color channel offset for a given index into the array of raw pixel values.
int hashCode()
Returns an integer hash code for this object.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int COUNT

Added in API level 21

The number of offsets in this vector.

Constant Value: 4 (0x00000004)

Public Methods

public void copyTo (int[] destination, int offset)

Added in API level 21

Copy the ColorChannel offsets into the destination vector.

Offsets are given in row-column scan order for a given 2x2 color pattern.

Parameters
destination an array big enough to hold at least .COUNT elements after the offset
offset a non-negative offset into the array
Throws
IllegalArgumentException if the offset is invalid.
ArrayIndexOutOfBoundsException if the destination vector is too small.
NullPointerException if the destination is null.

public boolean equals (Object obj)

Added in API level 21

Check if this BlackLevelPattern is equal to another BlackLevelPattern.

Two vectors are only equal if and only if each of the respective elements is equal.

Parameters
obj the object to compare this instance with.
Returns
  • true if the objects were equal, false otherwise

public int getOffsetForIndex (int column, int row)

Added in API level 21

Return the color channel offset for a given index into the array of raw pixel values.

Parameters
column the column index in the the raw pixel array.
row the row index in the raw pixel array.
Returns
  • a color channel offset.
Throws
IllegalArgumentException if a column or row given is negative.

public int hashCode ()

Added in API level 21

Returns an integer hash code for this object. By contract, any two objects for which equals(Object) returns true must return the same hash code value. This means that subclasses of Object usually override both methods or neither method.

Note that hash values must not change over time unless information used in equals comparisons also changes.

See Writing a correct hashCode method if you intend implementing your own hashCode method.

Returns
  • this object's hash code.