public
final
class
BlackLevelPattern
extends Object
java.lang.Object | |
↳ | android.hardware.camera2.params.BlackLevelPattern |
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.
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 |
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 a hash code value for the object. |
String
|
toString()
Return this |
Inherited methods | |
---|---|
From
class
java.lang.Object
|
int COUNT
The number of offsets in this vector.
Constant Value: 4 (0x00000004)
void copyTo (int[] destination, int offset)
Copy the ColorChannel offsets into the destination vector.
Offsets are given in row-column scan order for a given 2x2 color pattern.
Parameters | |
---|---|
destination |
int :
an array big enough to hold at least .COUNT elements after the
offset |
offset |
int :
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. |
boolean equals (Object obj)
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 |
Object :
the reference object with which to compare. |
Returns | |
---|---|
boolean |
true if the objects were equal, false otherwise
|
int getOffsetForIndex (int column, int row)
Return the color channel offset for a given index into the array of raw pixel values.
Parameters | |
---|---|
column |
int :
the column index in the the raw pixel array. |
row |
int :
the row index in the raw pixel array. |
Returns | |
---|---|
int |
a color channel offset. |
Throws | |
---|---|
IllegalArgumentException |
if a column or row given is negative. |
int hashCode ()
Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
HashMap
.
The general contract of hashCode
is:
hashCode
method
must consistently return the same integer, provided no information
used in equals
comparisons on the object is modified.
This integer need not remain consistent from one execution of an
application to another execution of the same application.
equals(Object)
method, then calling the hashCode
method on each of
the two objects must produce the same integer result.
equals(java.lang.Object)
method, then calling the hashCode
method on each of the
two objects must produce distinct integer results. However, the
programmer should be aware that producing distinct integer results
for unequal objects may improve the performance of hash tables.
As much as is reasonably practical, the hashCode method defined by
class Object
does return distinct integers for distinct
objects. (This is typically implemented by converting the internal
address of the object into an integer, but this implementation
technique is not required by the
JavaTM programming language.)
Returns | |
---|---|
int |
a hash code value for this object. |
String toString ()
Return this BlackLevelPattern
as a string representation.
"BlackLevelPattern([%d, %d], [%d, %d])"
, where each %d
represents one
black level offset of a color channel. The values are in the same order as channels listed
for the CFA layout key (see
SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
).
Returns | |
---|---|
String |
string representation of BlackLevelPattern |
See also: