jimmc.roots
Class Ncv

java.lang.Object
  |
  +--jimmc.roots.Ncv

public class Ncv
extends java.lang.Object

Ncv stands for Name-Colon-Value, referring to the syntax of the data file it is used to parse. A single instance of Ncv represents one name-value pair. Static methods provide support for parsing.


Field Summary
 java.lang.String name
           
 int numLines
           
 java.lang.String value
           
 
Constructor Summary
Ncv(java.lang.String[] lines, int startLine)
          Create an Ncv from an array of Strings and a starting point.
 
Method Summary
protected static java.lang.String getKey(java.lang.String line)
          Return the first word on the key line of the record
protected static java.lang.String getName(java.lang.String line)
          Return the first word on a colon line of the record
protected static java.lang.String getRecordValue(java.lang.String[] lines, java.lang.String name)
          Look for a particular name and return its value
static java.lang.String[] readLines(java.io.LineNumberReader li)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

public java.lang.String name

value

public java.lang.String value

numLines

public int numLines
Constructor Detail

Ncv

public Ncv(java.lang.String[] lines,
           int startLine)
Create an Ncv from an array of Strings and a starting point.
Method Detail

readLines

public static java.lang.String[] readLines(java.io.LineNumberReader li)
                                    throws java.io.IOException

getRecordValue

protected static java.lang.String getRecordValue(java.lang.String[] lines,
                                                 java.lang.String name)
Look for a particular name and return its value

getKey

protected static java.lang.String getKey(java.lang.String line)
Return the first word on the key line of the record

getName

protected static java.lang.String getName(java.lang.String line)
Return the first word on a colon line of the record