Most visited

Recently visited

Added in API level 17

EGLObjectHandle

public abstract class EGLObjectHandle
extends Object

java.lang.Object
   ↳ android.opengl.EGLObjectHandle
Known Direct Subclasses


包装的EGL对象的基类。

Summary

Protected constructors

EGLObjectHandle(int handle)

此构造函数在API级别21中已弃用。请改为使用EGLObjectHandle(long) 在64位平台上的处理将比java ints宽。

EGLObjectHandle(long handle)

Public methods

int getHandle()

此方法在API级别21中已弃用。请改为使用getNativeHandle() 在64位平台上的处理将比java ints宽。

long getNativeHandle()

返回包装的EGL对象的本地句柄。

int hashCode()

返回对象的哈希码值。

Inherited methods

From class java.lang.Object

Protected constructors

EGLObjectHandle

Added in API level 17
EGLObjectHandle (int handle)

此构造函数在API级别21中已弃用。
改为使用EGLObjectHandle(long) 在64位平台上的处理将比java ints宽。

Parameters
handle int

EGLObjectHandle

Added in API level 21
EGLObjectHandle (long handle)

Parameters
handle long

Public methods

getHandle

Added in API level 17
int getHandle ()

此方法在API级别21中已弃用。
改为使用getNativeHandle() 在64位平台上的处理将比java ints宽。

Returns
int

getNativeHandle

Added in API level 21
long getNativeHandle ()

返回包装的EGL对象的本地句柄。 该句柄可以转换为本机端相应的本机类型。 例如,EGLDisplay dpy =(EGLDisplay)句柄;

Returns
long the native handle of the wrapped EGL object.

hashCode

Added in API level 17
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.

Hooray!