@ExperimentalApi public class Expansions extends Object
Expansion
' properties on a model object should be filled in by the service when returning the model object. This allows the
service to only provide as much information in the model as required by the requester.
Use the ExpansionsParser
to produce expansions from dot delimited strings.
Modifier and Type | Field and Description |
---|---|
static Expansions |
EMPTY |
Constructor and Description |
---|
Expansions(Expansion... expansions) |
Expansions(Iterable<Expansion> expansions) |
Modifier and Type | Method and Description |
---|---|
boolean |
canExpand(String propertyName) |
void |
checkRecursiveExpansion(String propertyName)
Checks to see if the passed in expansion string is expanded again somewhere in the expansions map.
|
boolean |
equals(Object o) |
Expansions |
getSubExpansions(String propertyName) |
int |
hashCode() |
boolean |
isEmpty() |
Expansion[] |
merge(Expansion[] expansions) |
Expansions |
merge(Expansions expansions) |
Expansions |
prepend(String propertyName)
Create a new Expansions that prepends the propertyName to the path of all expansions represented
in this Expansions object.
|
Expansion[] |
toArray() |
String |
toString() |
public static final Expansions EMPTY
public Expansions(Expansion... expansions)
public Expansions merge(Expansions expansions)
public boolean canExpand(String propertyName)
public Expansions getSubExpansions(String propertyName)
public Expansions prepend(String propertyName)
The new set of expansions will answer true to canExpand(propertyName) and getSubExpansions(propertyName) will return the original set of expansions.
propertyName
- - the propertyName to prepend to the set of expansionspublic Expansion[] toArray()
public boolean isEmpty()
public void checkRecursiveExpansion(String propertyName)
propertyName
- the expansion propertyIllegalArgumentException
- if the expansion is recursiveCopyright © 2023 Atlassian. All rights reserved.