public class GlobalRef extends WeakReference
Modifier and Type | Method and Description |
---|---|
void |
add(AbstractReference ref) |
int |
count() |
boolean |
equals(Object o)
Allow GlobalRef's to be used as hashtable keys.
|
static int |
getCount(PyObject object)
Return the number of references to the specified PyObject.
|
static PyList |
getRefs(PyObject object)
Return a list of references to the specified PyObject.
|
int |
hashCode()
Allows GlobalRef to be used as hashtable keys.
|
static GlobalRef |
newInstance(PyObject object)
Create a new tracked GlobalRef.
|
int |
pythonHashCode()
The publicly used hashCode, for the AbstractReference wrapper.
|
PyList |
refs() |
clear, enqueue, get, isEnqueued
public GlobalRef(PyObject object)
public void add(AbstractReference ref)
public int count()
public PyList refs()
public static GlobalRef newInstance(PyObject object)
object
- a PyObject to referencepublic static int getCount(PyObject object)
object
- a PyObjectpublic static PyList getRefs(PyObject object)
object
- a PyObjectpublic boolean equals(Object o)
public int hashCode()
public int pythonHashCode()