T - - the type of value being stored/associated with each resource type entry added to the tree.public class ResourceTypeTree<T> extends Object
| Constructor and Description |
|---|
ResourceTypeTree(ResourceResolver adminResolver) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears the resource type hierarchy that has been built.
|
boolean |
contains(String resourceType) |
T |
get(String resourceType)
Gets the specific value added for a given specific resource type.
|
List<Map.Entry<String,T>> |
getChildren(String resourceType)
Retrieves a list of all the children entries for a resource type based on the resource type hierarchy.
|
T |
getClosest(String resourceType)
Gets the most closest matched value for a given resource type.
|
Collection<Map.Entry<String,T>> |
getParents(String resourceType)
Retrieves a list of all the parent entries for a resource type based on the resource type hierarchy.
|
void |
put(String resourceType,
T value)
Adds the given resource type and value to the resource type trees.
|
void |
remove(String resourceType)
Removes the given resource type (if present) from the resource type trees built up.
|
void |
setAdminResolver(ResourceResolver adminResolver) |
public ResourceTypeTree(ResourceResolver adminResolver)
adminResolver - an instance of the ResourceResolver with administrative privileges that will be
used to compare resource types.public void setAdminResolver(ResourceResolver adminResolver)
adminResolver - an instance of the ResourceResolver with administrative privileges that will be
used to compare resource types.public boolean contains(String resourceType)
resourceType - the resource type to search for.public void put(String resourceType, T value)
resourceType - resource type to add.value - value to associate with the resource type.public void remove(String resourceType)
resourceType - resource type to remove.public T getClosest(String resourceType)
resourceType - resource type to search forpublic T get(String resourceType)
resourceType - the resource type to search for.public List<Map.Entry<String,T>> getChildren(String resourceType)
resourceType - the resource type for which parents will be found.public Collection<Map.Entry<String,T>> getParents(String resourceType)
resourceType - the resource type for which parents will be found.public void clear()
"Copyright © 2010 - 2017 Adobe Systems Incorporated. All Rights Reserved"