public class AlgorithmParagraph
extends java.lang.Object
AlgorithmText
.
AlgorithmStep
s which represent the individual text passages of the paragraph.AlgorithmText
Constructor and Description |
---|
AlgorithmParagraph(AlgorithmText parent,
java.lang.String name,
int id)
Creates a new paragraph.
|
Modifier and Type | Method and Description |
---|---|
int |
getID()
Gets the identifier of the paragraph.
|
java.lang.String |
getName()
Gets the name of the paragraph.
|
AlgorithmText |
getParent()
Gets the parent of the paragraph.
|
AlgorithmStep |
getStep(int index)
Gets the step at the given index.
|
int |
getStepCount()
Gets the number of steps of this paragraph.
|
java.lang.String |
toString() |
public AlgorithmParagraph(AlgorithmText parent, java.lang.String name, int id) throws java.lang.IllegalArgumentException, InvalidIdentifierException
parent
- the associated AlgorithmText
name
- the name if the paragraph, like 1. Initialization
(important: the name is right-trimmed that means whitespace after the name have no effect)id
- the identifier of the paragraph which has to be unique based on the associated algorithm textjava.lang.IllegalArgumentException
- < 1
InvalidIdentifierException
- public final AlgorithmText getParent()
AlgorithmText
public final java.lang.String getName()
public final int getID()
public int getStepCount()
public AlgorithmStep getStep(int index) throws java.lang.IndexOutOfBoundsException
index
- the indexjava.lang.IndexOutOfBoundsException
- index < 0 || index >= getStepCount()
)public java.lang.String toString()
toString
in class java.lang.Object