| Modifier | Constructor and Description |
|---|---|
protected |
AbstractReference(T obj) |
| Modifier and Type | Method and Description |
|---|---|
T |
get()
Get an object.
|
long |
getAge()
Get the age of this
Reference since it's creation. |
int |
getReferenceCount()
Get the current number of references retained to this object.
|
void |
release()
Decrease the reference count by 1.
|
void |
release(int decr)
Decrease the reference count by incr amount.
|
void |
retain()
Increase reference count by 1.
|
void |
retain(int incr)
Increase reference count by incr amount.
|
String |
toString() |
protected AbstractReference(T obj)
public long getAge()
ReferenceReference since it's creation.getAge in interface Reference<T extends Recyclable>Reference was created.public int getReferenceCount()
ReferencegetReferenceCount in interface Reference<T extends Recyclable>public void retain()
Referenceretain in interface Reference<T extends Recyclable>public void retain(int incr)
Referenceretain in interface Reference<T extends Recyclable>incr - the amount to increment the reference count.public void release()
Referencerelease in interface Reference<T extends Recyclable>public void release(int decr)
Referencerelease in interface Reference<T extends Recyclable>decr - the amount to decrement the reference count.public T get()
Supplierget in interface Supplier<T extends Recyclable>Copyright © 2016. All rights reserved.