public class Journal
extends java.util.LinkedList
Journal is implemented as a LinkedList. Its first element is a StringVector, and when used with a TrianaType data object this is the StringVector description of the object. The elements after the first are themselves Journals that represent the histories of input data sets.
Methods are provided for extending the lists, for writing the whole tree to a String for output, and for re-constructing a Journal from a StringVector input.
TrianaType
,
Serialized FormConstructor and Description |
---|
Journal()
Constructs an empty Journal with fixed storage capacity and capacityIncrement.
|
Journal(StringVector information)
Constructs a Journal whose first element is the given StringVector.
|
Modifier and Type | Method and Description |
---|---|
void |
addJournal(Journal inputData)
Adds a Journal to the present Journal.
|
Journal |
copyMe()
Copies this Journal to a new Journal object, by value not by reference.
|
static Journal |
readReport(StringVector report,
java.lang.String tabbing)
Reads an input StringVector and creates a Journal.
|
java.lang.String |
report(java.lang.String tabbing,
int level)
Returns a String consisting of the contents of the first element of the present Journal and of the first elements
of all the Journals in the list, converted to Strings.
|
add, add, addAll, addAll, addFirst, addLast, clear, clone, contains, descendingIterator, element, get, getFirst, getLast, indexOf, lastIndexOf, listIterator, offer, offerFirst, offerLast, peek, peekFirst, peekLast, poll, pollFirst, pollLast, pop, push, remove, remove, remove, removeFirst, removeFirstOccurrence, removeLast, removeLastOccurrence, set, size, toArray, toArray
equals, hashCode, listIterator, removeRange, subList
containsAll, isEmpty, removeAll, retainAll, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
public Journal()
public Journal(StringVector information)
information
- the information about the present objectStringVector
public void addJournal(Journal inputData)
inputData
- the Journal associated with an input data setpublic Journal copyMe()
public java.lang.String report(java.lang.String tabbing, int level)
tabbing
- the String that is to be prependedlevel
- the number of times that tabbing is prependedpublic static Journal readReport(StringVector report, java.lang.String tabbing)
report
- A report created by method report and converted to a StringVectortabbing
- the indentation character(s) in the input reportStringVector