Package nz.org.riskscape.config
Interface ConfigString
- All Superinterfaces:
CharSequence
- All Known Implementing Classes:
ConfigString.Wrapper
A ConfigString is a wrapper around some other string that includes the location of this value, i.e. the file
resource that defines it (like an ini file).
This class can be used with binding to transparently include the locations of problematic values, so that error messages can direct the user to the problem.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ConfigStringanon(CharSequence value) default booleantoString()The string being wrappedstatic ConfigStringwrap(URI location, CharSequence value) Methods inherited from interface java.lang.CharSequence
charAt, chars, codePoints, isEmpty, length, subSequence
-
Method Details
-
anon
- Returns:
- a ConfigString that wraps the given value, but without a known location.
-
wrap
- Returns:
- a
ConfigStringthat uses the given location and value
-
toString
String toString()The string being wrapped
- Specified by:
toStringin interfaceCharSequence- Overrides:
toStringin classObject
-
getLocation
URI getLocation()- Returns:
- a location where this
ConfigStringwas defined.
-
isAnonymous
default boolean isAnonymous()- Returns:
- true if this
ConfigStrings location isResource.UNKNOWN_URI
-