com.atlassian.confluence.api.model.reference
Class ExpandedReference<T>
java.lang.Object
com.atlassian.confluence.api.model.reference.Reference<T>
com.atlassian.confluence.api.model.reference.ExpandedReference<T>
- All Implemented Interfaces:
- java.lang.Iterable<T>
@Internal
public final class ExpandedReference<T>
- extends Reference<T>
An expanded reference has a value, call get() will return that referent value.
Method Summary |
boolean |
exists()
|
T |
get()
|
java.util.Map<java.lang.Object,java.lang.Object> |
getIdProperties()
A map of properties key by the idProperty enum in the model class for the referent object. |
boolean |
isExpanded()
indicates a reference is expanded and can be resolved to an object by calling get, or whether
the reference is collapsed and calling get will throw an exception. |
java.util.Iterator<T> |
iterator()
|
com.atlassian.fugue.Option<T> |
option()
|
java.lang.Class |
referentClass()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
iterator
public java.util.Iterator<T> iterator()
get
public T get()
- Specified by:
get
in class Reference<T>
- Returns:
- the reference object or null if the object does not exist. It is Illegal to call get() on a reference
that has not been expanded
option
public com.atlassian.fugue.Option<T> option()
exists
public boolean exists()
- Specified by:
exists
in class Reference<T>
- Returns:
- true if the object is expanded and exists, or is collapsed and has enough information to identify itself, false if the object does not exist (is empty)
isExpanded
public boolean isExpanded()
- Description copied from class:
Reference
- indicates a reference is expanded and can be resolved to an object by calling get, or whether
the reference is collapsed and calling get will throw an exception.
- Specified by:
isExpanded
in class Reference<T>
- Returns:
- true
getIdProperties
public java.util.Map<java.lang.Object,java.lang.Object> getIdProperties()
- Description copied from class:
Reference
- A map of properties key by the idProperty enum in the model class for the referent object.
The map contains properties sufficient to identify the referent object.
- Specified by:
getIdProperties
in class Reference<T>
- Returns:
- a map of id properties keyed by idProperty enum
referentClass
public java.lang.Class referentClass()
- Specified by:
referentClass
in class Reference<T>
- Returns:
- the class of the referent object.
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Copyright © 2003-2014 Atlassian. All Rights Reserved.