Class ChangeId
- java.lang.Object
-
- com.google.ar.sceneform.utilities.ChangeId
-
public class ChangeId extends java.lang.Object
Used to identify when the state of an object has changed by incrementing an integer id. Other classes can determine when this object has changed by polling to see if the id has changed.This is useful as an alternative to an event listener subscription model when there is no safe point in the lifecycle of an object to unsubscribe from the event listeners. Unlike event listeners, this cannot cause memory leaks.
-
-
Field Summary
Fields Modifier and Type Field Description static int
EMPTY_ID
-
Constructor Summary
Constructors Constructor Description ChangeId()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
checkChanged(int id)
int
get()
boolean
isEmpty()
void
update()
-
-
-
Field Detail
-
EMPTY_ID
public static final int EMPTY_ID
- See Also:
- Constant Field Values
-
-