|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.smartics.testdoc.report.index.StaticSection<T>
T
- the type of the items added to this section.
@NotThreadSafe public class StaticSection<T extends Serializable>
The implementation provides a static view on sections. The sections, once added, cannot be modified afterwards.
Constructor Summary | |
---|---|
StaticSection(String name) Convenience constructor with an empty set of properties. |
|
StaticSection(String name, Map<String,Serializable> properties) Default constructor. |
Method Summary | |
---|---|
void |
addItem(T item) Adds the given item to this section. |
void |
addSubSection(Section<T> subSection) Adds the given sub section to this section. |
boolean |
containsSubSections() Checks if the given section contains sub sections. |
List<T> |
getItems() Returns the list of items associated with this section. |
String |
getName() Returns the name of this section. |
Map<String,? extends Serializable> |
getProperties() Returns the properties associated with this section. |
List<Section<T>> |
getSubSections() Returns the list of sub sections to this section. |
boolean |
isEmpty() Checks if this section or any sub sections contains at least one item. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StaticSection(String name)
name
- the name of this section.
IllegalArgumentException
- if
name
is blank.
public StaticSection(String name, Map<String,Serializable> properties) throws IllegalArgumentException
name
- the name of this section.
properties
- the properties associated with this section. May be
null
.
IllegalArgumentException
- if
name
is blank.
Method Detail |
---|
public String getName()
getName
in interface
Section<T extends Serializable>
Section.getName()
public Map<String,? extends Serializable> getProperties()
getProperties
in interface
Section<T extends Serializable>
Section.getProperties()
public void addSubSection(Section<T> subSection)
addSubSection
in interface
Section<T extends Serializable>
subSection
- the section to be added as sub section to this section.
public List<Section<T>> getSubSections()
getSubSections
in interface
Section<T extends Serializable>
null
.
Section.getSubSections()
public void addItem(T item)
addItem
in interface
Section<T extends Serializable>
item
- the item to be added to this section.
public List<T> getItems()
getItems
in interface
Section<T extends Serializable>
null
.
Section.getItems()
public boolean isEmpty()
isEmpty
in interface
Section<T extends Serializable>
true
if at least on item is contained,
false
if no item is contained.
Section.isEmpty()
public boolean containsSubSections()
containsSubSections
in interface
Section<T extends Serializable>
true
if at least on sub section is contained,
false
otherwise.
Section.containsSubSections()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |