public class RunParmArrayEntry extends java.lang.Object implements java.lang.Comparable<RunParmArrayEntry>
Modifier and Type | Field and Description |
---|---|
BatchCommand |
cmd |
java.lang.String |
commentLine
if commentLine != null then the entire entry is a comment and there is no
data in the rest of it.
|
java.lang.String |
name
name is the first field on a DelimitedTextParser line.
|
java.lang.String[] |
values
values is an array of String corresponding to fields 1 -> n of a
DelimitedTextParser.
|
Constructor and Description |
---|
RunParmArrayEntry()
Construct a dummy RunParmArrayEntry with no parameters.
|
RunParmArrayEntry(DelimitedTextParser parser)
Construct a RunParmArrayEntry using a DelimitedTextParser pre-loaded with
text line and delimiter/quoter parms.
|
RunParmArrayEntry(java.lang.String name,
java.lang.String[] values)
Construct a RunParmArrayEntry manually using a name and values array.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(RunParmArrayEntry obj)
Compares RunParmArrayEntry object based on the name.
|
boolean |
equals(java.lang.Object obj)
Compute for equality with another RunParmArrayEntry based on name String
equals().
|
int |
hashCode()
Compute hashcode for RunParmArrayEntry using name.hashCode().
|
java.lang.String |
toString()
Converts RunParmArrayEntry to a String.
|
public java.lang.String commentLine
public java.lang.String name
Generally, this would be a keyword.
public BatchCommand cmd
public java.lang.String[] values
The program knows nothing about the contents of fields except that they are String's, and perhaps empty ("").
public RunParmArrayEntry()
public RunParmArrayEntry(java.lang.String name, java.lang.String[] values)
Quoter and Delimiter characters are set to the defaults from UtilConstants:
name
- the name of the RunParmvalues
- the arguments to the RunParmpublic RunParmArrayEntry(DelimitedTextParser parser)
Checks for comment: if the input line begins with one of the following characters then it is deemd a "comment":
If the line is not a comment but is empty or null, an IllegalArgumentException is thrown. Otherwise, the name and values are extracted using DelimitedTextParser.
parser
- pre-loaded DelimitedTextParser object.public int hashCode()
This won't work well with a bunch of comment lines thrown in, or duplicates!
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int compareTo(RunParmArrayEntry obj)
compareTo
in interface java.lang.Comparable<RunParmArrayEntry>
obj
- RunParmArrayEntry object to compare to this.public java.lang.String toString()
toString
in class java.lang.Object