Lists support nesting to create multi-level structures. Each level of nesting
increases the indentation based on the ItemListConfiguration.
Resolution Order:
Scoping: Sublists added via item(String, String, ItemList) are
automatically reconfigured to inherit the configuration of the parent list.
Self-nesting is strictly prohibited.
Thread Safety: This class is not thread-safe. The internal item storage is mutable, and the configuration may be updated internally during nesting operations.
| Modifier and Type | Field and Description |
|---|---|
| private ItemListConfiguration | |
| private final List | |
| private String | |
| private static final ItemList |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | |
| pack-priv void | |
| pack-priv ItemList | |
| pack-priv ItemListConfiguration | |
| public boolean | equals(Object o)
Overrides java. Indicates whether some other object is "equal to" this one. |
| public String | get()
Implements io. Builds and returns the fully formatted string representation of this component. |
| public int | |
| public ItemList | |
| public ItemList | |
| public ItemList | |
| private String | |
| pack-priv ItemList | |
| public String |
| configuration | back to summary |
|---|---|
| private ItemListConfiguration configuration | |
| items | back to summary |
|---|---|
| private final List<ListItem> items | |
| lastSymbol | back to summary |
|---|---|
| private String lastSymbol | |
| NONE | back to summary |
|---|---|
| private static final ItemList NONE | |
| ItemList | back to summary |
|---|---|
| public ItemList(ItemListConfiguration configuration) | |
| ItemList | back to summary |
|---|---|
| public ItemList() | |
| assertNotSelf | back to summary |
|---|---|
| pack-priv void assertNotSelf(ItemList list) | |
| buildList | back to summary |
|---|---|
| pack-priv void buildList(StringBuilder sb, int depth, ItemList root) | |
| child | back to summary |
|---|---|
| pack-priv ItemList child() Internal test helper to retrieve the first child sublist. | |
| configuration | back to summary |
|---|---|
| pack-priv ItemListConfiguration configuration() Internal test helper to retrieve the current configuration. | |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.
| |
| get | back to summary |
|---|---|
| public String get() Implements io. Doc from io. Builds and returns the fully formatted string representation of this component. Each call performs a full render — no caching is implied by this interface. Implementations may document their own caching behavior if applicable. Returns the fully formatted hierarchical list as a string, with markup resolved according to the current configuration.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| item | back to summary |
|---|---|
| public ItemList item(String symbol, String content, ItemList subList) Adds an item to the list with an associated sublist. The sublist will be modified to use the parent's configuration.
| |
| item | back to summary |
|---|---|
| public ItemList item(String symbol, String content) Adds a leaf item to the list with no sublist. | |
| item | back to summary |
|---|---|
| public ItemList item(String content) Adds a leaf item to the list with no sublist. Uses the last used symbol for this item | |
| parseString | back to summary |
|---|---|
| private String parseString(String str) | |
| recursivelySetConfiguration | back to summary |
|---|---|
| pack-priv ItemList recursivelySetConfiguration(ItemListConfiguration configuration) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |