|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.iotabits.util.StructuredProperties
This applies some additional semantics to standard Java Properties files.
Constructor Summary | |
StructuredProperties()
|
|
StructuredProperties(java.util.Properties props)
|
|
StructuredProperties(java.util.ResourceBundle bundle)
|
|
StructuredProperties(StructuredProperties sps)
|
Method Summary | |
boolean |
containsSymbols(java.util.Properties symbols)
|
boolean |
equals(java.lang.Object other)
|
java.lang.Boolean |
getBooleanProperty(java.lang.String name)
|
java.lang.Class |
getClassProperty(java.lang.String name)
|
java.lang.Double |
getDoubleProperty(java.lang.String name)
|
java.lang.Long |
getLongProperty(java.lang.String name)
|
java.lang.String |
getProperty(java.lang.String name)
|
StructuredProperties |
getSection(java.lang.String prefixName)
Return a StructuredProperties object that has is new, and has all the properties starting with the given prefix in it. |
java.lang.String[] |
getSimpleList(java.lang.String listName)
aList.1=one aList.2=two => String[0] = one String[2] = two |
StructuredProperties[] |
getStructuredList(java.lang.String listName)
aStructList.1.FieldOne=ItemOneFieldOneValue aStructList.1.FieldTwo=ItemOneFieldTwoValue aStructList.1.FieldThree.1=ItemOneField3.1Value aStructList.1.FieldThree.2=ItemOneField3.2Value aStructList.2.FieldOne=ItemTwoFieldOneValue aStructList.2.FieldTwo=ItemTwoFieldTwoValue aStructList.2.FieldThree.1=ItemTwoField3.1Value aStructList.2.FieldThree.2=ItemTwoField3.2Value ==> Properties[0] = {FieldOne=ItemOneFieldOneValue, FieldTwo=ItemOneFieldTwoValue, FieldThree.1=ItemOneField3.1Value FieldThree.2=ItemOneField3.2Value } Properties[1] = {FieldOne=ItemTwoFieldOneValue, FieldTwo=ItemTwoFieldTwoValue, FieldThree.1=ItemTwoField3.1Value FieldThree.2=ItemTwoField3.2Value } |
int |
hashCode()
|
StructuredProperties |
substituteSymbols(java.util.Properties symbols)
Symbols has keys that are to be substituted with their values, in the values of the source Properties object. |
StructuredProperties |
substituteSymbols(StructuredProperties symbols)
Substitute symbols that come in as a StructuredProperties class. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public StructuredProperties()
public StructuredProperties(java.util.Properties props)
public StructuredProperties(java.util.ResourceBundle bundle)
public StructuredProperties(StructuredProperties sps)
Method Detail |
public StructuredProperties getSection(java.lang.String prefixName)
public java.lang.String[] getSimpleList(java.lang.String listName)
public StructuredProperties[] getStructuredList(java.lang.String listName)
public StructuredProperties substituteSymbols(java.util.Properties symbols)
Symbols: { $FOO$=foo, %BAR%=bar };
Source: { One=--$FOO$--, Two=--%BAR%--$Foo$-- };
Result: { One=--foo--, Two=--bar--foo-- };
Symbols can refer to other symbols in the values. They are replaced recursively , up to MAX_SYM_NESTING levels deep.
public StructuredProperties substituteSymbols(StructuredProperties symbols)
symbols
-
public boolean containsSymbols(java.util.Properties symbols)
public java.lang.Boolean getBooleanProperty(java.lang.String name)
public java.lang.Double getDoubleProperty(java.lang.String name)
public java.lang.Long getLongProperty(java.lang.String name)
public java.lang.Class getClassProperty(java.lang.String name) throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
public java.lang.String getProperty(java.lang.String name)
public boolean equals(java.lang.Object other)
public java.lang.String toString()
public int hashCode()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |