T - the reference value typeA - the attachment typeReference<T,A>public class StrongReference<T,A> extends java.lang.Object implements Reference<T,A>
Reference.Type| Constructor | Description |
|---|---|
StrongReference(T referent) |
Construct a new instance.
|
StrongReference(T referent,
A attachment) |
Construct a new instance.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
clear() |
Clear the reference.
|
T |
get() |
Get the value, or
null if the reference has been cleared. |
A |
getAttachment() |
Get the attachment, if any.
|
Reference.Type |
getType() |
Get the type of the reference.
|
java.lang.String |
toString() |
public StrongReference(T referent, A attachment)
referent - the referentattachment - the attachmentpublic StrongReference(T referent)
referent - the referentpublic T get()
Referencenull if the reference has been cleared.public void clear()
Referencepublic A getAttachment()
ReferencegetAttachment in interface Reference<T,A>public Reference.Type getType()
Referencepublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2017 JBoss, a division of Red Hat, Inc.