|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.nand.util.i18n.ParsedPropsFilePair.FileEntry net.nand.util.i18n.ParsedPropsFilePair.FileKeyEntry
public static final class ParsedPropsFilePair.FileKeyEntry
Key-value pair line in source and destination, with preceding comments, or multi-line comment at the end of the file.
Also used by editor for newly inserted lines, when we are unsure if they will be comments or key-value.
To convert those before saving, call ParsedPropsFilePair.convertInsertedRows()
.
Field Summary | |
---|---|
java.util.List<java.lang.String> |
destComment
Preceding comment lines and/or blank lines in the destination language, or null ;
same format as PropsFileParser.KeyPairLine.comment |
boolean |
destSpacedEquals
If true, the key and value are separated by " = " instead of "=". |
java.lang.CharSequence |
destValue
Value in destination language, or null . |
java.lang.String |
key
key for retrieval, or null for comments at the end of the file |
boolean |
newAdd
Is this line newly added in the editor during this edit session? Remains true even after saving the file, so its key can still be edited. |
java.util.List<java.lang.String> |
srcComment
Preceding comment lines and/or blank lines in the source language, or null ;
same format as PropsFileParser.KeyPairLine.comment |
boolean |
srcSpacedEquals
If true, the key and value are separated by " = " instead of "=". |
java.lang.CharSequence |
srcValue
Value in source language, or null for a key defined only in the destination file, or for
empty strings or only whitespace. |
Constructor Summary | |
---|---|
ParsedPropsFilePair.FileKeyEntry(java.util.List<java.lang.String> srcComment)
Create an entry that's only a comment without a following key-value pair (at the end of the file). |
|
ParsedPropsFilePair.FileKeyEntry(java.lang.String key,
java.lang.String srcValue)
Create an entry for a source language (no destination value yet). |
|
ParsedPropsFilePair.FileKeyEntry(java.lang.String key,
java.lang.String srcValue,
java.lang.String destValue)
Create an entry for a source and destination. |
Method Summary | |
---|---|
java.lang.String |
toString()
toString includes the source and destination values, and number of source and destination comment lines. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public boolean newAdd
key
can still be edited.
ParsedPropsFilePair.convertInsertedRows()
public java.lang.String key
null
for comments at the end of the file
public java.util.List<java.lang.String> srcComment
null
;
same format as PropsFileParser.KeyPairLine.comment
public java.util.List<java.lang.String> destComment
null
;
same format as PropsFileParser.KeyPairLine.comment
public java.lang.CharSequence srcValue
null
for a key defined only in the destination file, or for
empty strings or only whitespace.
public java.lang.CharSequence destValue
null
. Empty strings or only whitespace are null
.
public boolean srcSpacedEquals
public boolean destSpacedEquals
Constructor Detail |
---|
public ParsedPropsFilePair.FileKeyEntry(java.lang.String key, java.lang.String srcValue) throws java.lang.IllegalArgumentException
key
- srcValue
-
java.lang.IllegalArgumentException
- if key
is nullpublic ParsedPropsFilePair.FileKeyEntry(java.lang.String key, java.lang.String srcValue, java.lang.String destValue) throws java.lang.IllegalArgumentException
key
- Key for retrieval. May be null
only if inserting a new line which may become a comment.
Before saving, set the key and value, or convert to ParsedPropsFilePair.FileCommentEntry
.srcValue
- Value in source language, or null
for empty or only whitespacedestValue
- Value in destination language, or null
for undefined, empty or only whitespace
java.lang.IllegalArgumentException
- if key
is nullpublic ParsedPropsFilePair.FileKeyEntry(java.util.List<java.lang.String> srcComment)
srcComment
- Comment text in the source language fileMethod Detail |
---|
public final java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |