LensIntrinsicsSample
public
final
class
LensIntrinsicsSample
extends Object
java.lang.Object | |
↳ | android.hardware.camera2.params.LensIntrinsicsSample |
Immutable class to store an
lens intrinsics intra-frame sample
.
Summary
Public constructors | |
---|---|
LensIntrinsicsSample(long timestampNs, float[] lensIntrinsics)
Create a new |
Public methods | |
---|---|
boolean
|
equals(Object obj)
Check if this |
float[]
|
getLensIntrinsics()
Get the lens |
long
|
getTimestampNanos()
Get the timestamp in nanoseconds. |
int
|
hashCode()
Returns a hash code value for the object. |
String
|
toString()
Return the LensIntrinsicsSample as a string representation. |
Inherited methods | |
---|---|
Public constructors
LensIntrinsicsSample
public LensIntrinsicsSample (long timestampNs, float[] lensIntrinsics)
Create a new LensIntrinsicsSample
.
LensIntrinsicsSample
contains the timestamp and the
CaptureResult#LENS_INTRINSIC_CALIBRATION
sample.
Parameters | |
---|---|
timestampNs |
long : timestamp in nanoseconds of the lens intrinsics sample. This uses the
same time basis as CaptureResult#SENSOR_TIMESTAMP . |
lensIntrinsics |
float : the lens intrinsic
calibration for the sample.
This value cannot be null . |
Throws | |
---|---|
IllegalArgumentException |
if lensIntrinsics length is different from 5 |
Public methods
equals
public boolean equals (Object obj)
Check if this LensIntrinsicsSample
is equal to another LensIntrinsicsSample
.
Two samples are only equal if and only if each of the lens intrinsics are equal.
Parameters | |
---|---|
obj |
Object : the reference object with which to compare. |
Returns | |
---|---|
boolean |
true if the objects were equal, false otherwise |
getLensIntrinsics
public float[] getLensIntrinsics ()
Get the lens intrinsics
calibration
Returns | |
---|---|
float[] |
a floating point value (guaranteed to be finite)
This value cannot be null . |
See also:
getTimestampNanos
public long getTimestampNanos ()
Get the timestamp in nanoseconds.
The timestamps are in the same time basis as and comparable to
android.sensor.timestamp
.
Returns | |
---|---|
long |
a long value (guaranteed to be finite) |
hashCode
public 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:
- Whenever it is invoked on the same object more than once during
an execution of a Java application, the
hashCode
method must consistently return the same integer, provided no information used inequals
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. - If two objects are equal according to the
equals
method, then calling thehashCode
method on each of the two objects must produce the same integer result. - It is not required that if two objects are unequal
according to the
equals
method, then calling thehashCode
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.
Returns | |
---|---|
int |
a hash code value for this object. |
toString
public String toString ()
Return the LensIntrinsicsSample as a string representation.
"LensIntrinsicsSample{timestamp:%l, sample:%s}"
represents the LensIntrinsics
sample's timestamp, and calibration data.
Returns | |
---|---|
String |
string representation of LensIntrinsicsSample |