public class Section extends Object
Constructor and Description |
---|
Section()
Creates a new
Section instance. |
Modifier and Type | Method and Description |
---|---|
String |
getEndingLine()
Gets the line marking the end of this section.
|
StringBuilder |
getHeadContent()
Gets the content of this section preceding any child section content.
|
String |
getName()
Gets the name of this section.
|
Section |
getSection(String sectionName)
Gets a child section matching a given name.
|
List<Section> |
getSections()
Gets the child sections of this section.
|
String |
getStartingLine()
Gets the line marking the start of this section.
|
StringBuilder |
getTailContent()
Gets the content of this section succeeding any child section content.
|
void |
setEndingLine(String value)
Sets the line marking the end of this section.
|
void |
setName(String value)
Sets the name of this section.
|
void |
setStartingLine(String value)
Sets the line marking the start of this section.
|
public Section()
Section
instance.public String getName()
null
.public void setName(String value)
value
- The new name of this section or null
.public String getStartingLine()
public void setStartingLine(String value)
value
- The new line marking the start of this section.public String getEndingLine()
public void setEndingLine(String value)
value
- The new line marking the end of this section.public StringBuilder getHeadContent()
public StringBuilder getTailContent()
public List<Section> getSections()
This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make
to the returned list will be present inside the object. This is why there is no set
method for the
sections property.
public Section getSection(String sectionName)
sectionName
- The name of the section to return.sectionName
or null
, if no such section is found.NullPointerException
- if sectionName
is null
.Copyright © 2005–2016 The JOMC Project. All rights reserved.