StreamConfigurationDurationpublic final class StreamConfigurationDuration extends Object Immutable class to store a time duration for any given format/size combination. |
Fields Summary |
---|
private final int | mFormat | private final int | mWidth | private final int | mHeight | private final long | mDurationNs |
Constructors Summary |
---|
public StreamConfigurationDuration(int format, int width, int height, long durationNs)Create a new {@link StreamConfigurationDuration}.
mFormat = checkArgumentFormatInternal(format);
mWidth = checkArgumentPositive(width, "width must be positive");
mHeight = checkArgumentPositive(height, "height must be positive");
mDurationNs = checkArgumentNonnegative(durationNs, "durationNs must be non-negative");
|
Methods Summary |
---|
public boolean | equals(java.lang.Object obj)Check if this {@link StreamConfigurationDuration} is equal to another
{@link StreamConfigurationDuration}.
Two vectors are only equal if and only if each of the respective elements is equal.
if (obj == null) {
return false;
}
if (this == obj) {
return true;
}
if (obj instanceof StreamConfigurationDuration) {
final StreamConfigurationDuration other = (StreamConfigurationDuration) obj;
return mFormat == other.mFormat &&
mWidth == other.mWidth &&
mHeight == other.mHeight &&
mDurationNs == other.mDurationNs;
}
return false;
| public long | getDuration()Get the time duration (in nanoseconds).
return mDurationNs;
| public final int | getFormat()Get the internal image {@code format} in this stream configuration duration
return mFormat;
| public int | getHeight()Return the height of the stream configuration duration
return mHeight;
| public android.util.Size | getSize()Convenience method to return the size of this stream configuration duration.
return new Size(mWidth, mHeight);
| public int | getWidth()Return the width of the stream configuration duration.
return mWidth;
| public int | hashCode(){@inheritDoc}
return HashCodeHelpers.hashCode(mFormat, mWidth, mHeight,
(int) mDurationNs, (int)(mDurationNs >>> Integer.SIZE));
|
|