Most visited

Recently visited

Added in API level 23

InputConfiguration

public final class InputConfiguration
extends Object

java.lang.Object
   ↳ android.hardware.camera2.params.InputConfiguration


不可变类用于存储用于创建可重新处理捕获会话的输入配置。

也可以看看:

Summary

Public constructors

InputConfiguration(int width, int height, int format)

使用宽度,高度和用户定义的格式创建输入配置。

Public methods

boolean equals(Object obj)

检查这个InputConfiguration是否等于另一个InputConfiguration。

int getFormat()

获取此输入配置的格式。

int getHeight()

获取此输入迁移的高度。

int getWidth()

获取此输入配置的宽度。

int hashCode()

返回对象的哈希码值。

String toString()

以字符串表示形式返回此 InputConfiguration

Inherited methods

From class java.lang.Object

Public constructors

InputConfiguration

Added in API level 23
InputConfiguration (int width, 
                int height, 
                int format)

使用宽度,高度和用户定义的格式创建输入配置。

应用程序可以访问用户定义格式的图像。 使用SCALER_STREAM_CONFIGURATION_MAP查询支持的输入格式

Parameters
width int: Width of the input buffers.
height int: Height of the input buffers.
format int: Format of the input buffers. One of ImageFormat or PixelFormat constants.

也可以看看:

Public methods

equals

Added in API level 23
boolean equals (Object obj)

检查这个InputConfiguration是否等于另一个InputConfiguration。

两个输入配置在当且仅当它们具有相同的宽度,高度和格式时相等。

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

getFormat

Added in API level 23
int getFormat ()

获取此输入配置的格式。

Returns
int format of this input configuration.

getHeight

Added in API level 23
int getHeight ()

获取此输入迁移的高度。

Returns
int height of this input configuration.

getWidth

Added in API level 23
int getWidth ()

获取此输入配置的宽度。

Returns
int width of this input configuration.

hashCode

Added in API level 23
int hashCode ()

返回对象的哈希码值。 这种方法支持散列表的好处,例如HashMap提供的HashMap

hashCode的总合同是:

  • 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 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.
  • If two objects are equal according to the equals(Object) method, then calling the hashCode 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(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.

尽可能合理实用,由类Object定义的hashCode方法确实为不同的对象返回不同的整数。 (这通常通过将对象的内部地址转换为整数来实现,但Java TM编程语言不需要此实现技术。)

Returns
int a hash code value for this object.

toString

Added in API level 23
String toString ()

以字符串表示形式返回此 InputConfiguration

"InputConfiguration(w:%d, h:%d, format:%d)" ,其中 %d代表宽度,高度和格式。

Returns
String string representation of InputConfiguration

Hooray!