public class MDFField extends java.lang.Object implements java.lang.Comparable<MDFField>
The beginning is identified by the pattern \s*\$FIELD\s*:\s*"
The separation part is identified by the pattern "\s*[,:;]\s*"
The end is identified by the pattern .*"\s*\$\s*
Another variant is following:
The field name is separated from the keyword by tab. There is not identifier like $Field
that help to find a definition.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
FIELD_MARKER |
static java.lang.String |
FIELD_MARKER_PATTERN |
static java.lang.String |
FIELD_SEP_POSTFIX |
static java.lang.String |
FIELD_SEP_PREFIX |
static java.lang.String |
FIELD_START_PATTERN |
Constructor and Description |
---|
MDFField(java.lang.String name,
java.lang.String value)
The default constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(MDFField arg0)
Compare the name of the field to the name of another field.
|
java.lang.String |
getName()
Get the name of the field.
|
java.lang.String |
getValue()
Get the value of the field.
|
static void |
main(java.lang.String[] args) |
static MDFField |
scanField(java.lang.String s)
Scan a field from string value.
|
java.lang.String |
toString() |
public static final java.lang.String FIELD_MARKER
public static final java.lang.String FIELD_MARKER_PATTERN
public static final java.lang.String FIELD_START_PATTERN
public static final java.lang.String FIELD_SEP_PREFIX
public static final java.lang.String FIELD_SEP_POSTFIX
public MDFField(java.lang.String name, java.lang.String value)
public static MDFField scanField(java.lang.String s)
s
- the string value.public java.lang.String getName()
public java.lang.String getValue()
public int compareTo(MDFField arg0)
compareTo
in interface java.lang.Comparable<MDFField>
arg0
- the other field.public java.lang.String toString()
toString
in class java.lang.Object
public static void main(java.lang.String[] args)