com.atlassian.confluence.api.model.reference
Class ExpandedReference<T>

java.lang.Object
  extended by com.atlassian.confluence.api.model.reference.Reference<T>
      extended by com.atlassian.confluence.api.model.reference.ExpandedReference<T>
All Implemented Interfaces:
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()
           
 Map<Object,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.
 Iterator<T> iterator()
           
 com.atlassian.fugue.Option<T> option()
           
 Class referentClass()
           
 String toString()
           
 
Methods inherited from class com.atlassian.confluence.api.model.reference.Reference
collapsed, collapsed, collapsed, empty, equals, getIdProperty, hashCode, orEmpty, orEmpty, to
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

iterator

public 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 Map<Object,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 Class referentClass()
Specified by:
referentClass in class Reference<T>
Returns:
the class of the referent object.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2003–2015 Atlassian. All rights reserved.