org.nuxeo.ecm.webapp.clipboard
Class SummaryImpl
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<String,SummaryEntry>
org.nuxeo.ecm.webapp.clipboard.SummaryImpl
- All Implemented Interfaces:
- Serializable, Cloneable, Map<String,SummaryEntry>, Summary
public class SummaryImpl
- extends HashMap<String,SummaryEntry>
- implements Summary, Serializable
This class is an implementation of the interface Summary. It intends to build
and display a summary, thanks to summary items in the HashMap.
- Author:
- Brice Chaffangeon
- See Also:
- Serialized Form
Nested classes/interfaces inherited from interface java.util.Map |
Map.Entry<K,V> |
Methods inherited from class java.util.HashMap |
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values |
Methods inherited from interface java.util.Map |
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values |
SummaryImpl
public SummaryImpl()
hasChild
public boolean hasChild(SummaryEntry parentEntry)
- Description copied from interface:
Summary
- Tests if the given entry has at least one child in the map.
- Specified by:
hasChild
in interface Summary
- Parameters:
parentEntry
- is the entry to test
- Returns:
- true if there is at least one child
getChildren
public List<SummaryEntry> getChildren(SummaryEntry parentEntry)
- Specified by:
getChildren
in interface Summary
- Parameters:
parentEntry
- is parent of children you want to get
- Returns:
- all the children of the parentEntry in the List
displayEntry
public String displayEntry(StringBuffer sb,
SummaryEntry parentEntry)
- Description copied from interface:
Summary
- Displays recursively on entry.
- Specified by:
displayEntry
in interface Summary
- Parameters:
sb
- is the String to display.parentEntry
- is the entry to display
- Returns:
- the String to display
toFlatList
public String toFlatList()
- Description copied from interface:
Summary
- Display all the map in a flat way. The display is ordered by path.
- Specified by:
toFlatList
in interface Summary
- Returns:
- the string to display
toString
public String toString()
- Overrides:
toString
in class AbstractMap<String,SummaryEntry>
- Returns:
- the hierarchical view by default.
toTreeString
public String toTreeString()
- Description copied from interface:
Summary
- Displays all the map hierarchically.
- Specified by:
toTreeString
in interface Summary
- Returns:
- the string to display
getSummaryRoot
public SummaryEntry getSummaryRoot()
- Gets the root SummaryEntry in the map, usually identified by
a key in the map set to 0.
- Specified by:
getSummaryRoot
in interface Summary
- Returns:
- the root SummaryEntry in the map
Copyright © 2011 Nuxeo SAS. All Rights Reserved.