|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.tomgibara.pronto.config.source.StringConfigSource
public class StringConfigSource
Instances of this class convert a single string into a set of properties as follows: 1) The string is split at each semicolon. 2) Each component is split at a colon into a key and a value. 3) Each key-value pair is trimmed and added to the map This encoding should be superficially familiar to those familiar with CSS style properties. Note that there are no mechanisms for escaping colons and semicolons. Keys may not be duplicated.
| Constructor Summary | |
|---|---|
StringConfigSource(java.lang.String string)
Constructs a new set of properties from the supplied string. |
|
| Method Summary | |
|---|---|
java.util.Map<java.lang.String,java.lang.String> |
getProperties()
A map of the configuration properties supplied by this source. |
long |
lastModified()
Because this object is immutable, this method returns zero. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public StringConfigSource(java.lang.String string)
throws java.lang.IllegalArgumentException
string - a string containing key value pairs, possibly empty
java.lang.IllegalArgumentException - if the string supplied to the constructor is null, or cannot
be parsed.| Method Detail |
|---|
public long lastModified()
lastModified in interface ConfigSourcepublic java.util.Map<java.lang.String,java.lang.String> getProperties()
ConfigSource
getProperties in interface ConfigSourcepublic 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 | |||||||||