Class QDCSS
java.lang.Object
emi.shims.java.com.unascribed.nil.QDCSS
A quick-and-dirty "CSS" parser.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsKey(String key) entrySet()flatten()Return a view of this QDCSS's data, dropping multivalues and collapsing to a basic key-value mapping that returns the last defined value for any given key.Return the last defined value for the given key.Return all defined values for the given key, or an empty list if it's not defined.getBoolean(String key) keySet()static QDCSSstatic QDCSSload(String fileName, InputStream in) static QDCSSstatic QDCSSstatic QDCSSstatic QDCSSMerge the given QDCSS's data with this QDCSS's data, returning a new QDCSS object.voidvoidvoidvoidEnables "yap" mode for parse failures in this config, where rather than throwing a BadValueException a warning string will be sent to this Consumer and an empty Optional returned to the caller of get*.intsize()toString()Lossily convert this QDCSS's data into an INI.
-
Method Details
-
setYapLog
Enables "yap" mode for parse failures in this config, where rather than throwing a BadValueException a warning string will be sent to this Consumer and an empty Optional returned to the caller of get*.If yapLog is null, "yap" mode is turned off.
-
containsKey
-
put
-
put
-
put
-
getAll
Return all defined values for the given key, or an empty list if it's not defined. -
getBlame
-
getBlame
-
get
Return the last defined value for the given key. -
getInt
- Throws:
QDCSS.BadValueException
-
getDouble
- Throws:
QDCSS.BadValueException
-
getBoolean
- Throws:
QDCSS.BadValueException
-
getPrelude
-
getEnum
public <E extends Enum<E>> Optional<E> getEnum(String key, Class<E> clazz) throws QDCSS.BadValueException - Throws:
QDCSS.BadValueException
-
keySet
-
entrySet
-
size
public int size() -
toString
Lossily convert this QDCSS's data into an INI. Comments, section declarations, etc will be lost. -
merge
Merge the given QDCSS's data with this QDCSS's data, returning a new QDCSS object. Keys defined in the given QDCSS will have their values appended to this one's. For usages ofget(java.lang.String), this is equivalent to an override. -
flatten
Return a view of this QDCSS's data, dropping multivalues and collapsing to a basic key-value mapping that returns the last defined value for any given key. -
load
- Throws:
SyntaxErrorException
-
load
- Throws:
IOException
-
load
- Throws:
IOException
-
load
- Throws:
IOException
-
load
- Throws:
IOException
-
load
- Throws:
IOException
-