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 ConfigString
anon
(CharSequence value) default boolean
toString()
The string being wrappedstatic ConfigString
wrap
(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
ConfigString
that uses the given location and value
-
toString
String toString()The string being wrapped
- Specified by:
toString
in interfaceCharSequence
- Overrides:
toString
in classObject
-
getLocation
URI getLocation()- Returns:
- a location where this
ConfigString
was defined.
-
isAnonymous
default boolean isAnonymous()- Returns:
- true if this
ConfigString
s location isResource.UNKNOWN_URI
-