public class Yamls
extends java.lang.Object
Constructor and Description |
---|
Yamls() |
Modifier and Type | Method and Description |
---|---|
static void |
dump(int depth,
java.lang.Object r) |
static <T> T |
getAs(java.lang.Object x,
java.lang.Class<T> type)
returns the given yaml object (map or list or primitive) as the given yaml-supperted type
(map or list or primitive e.g.
|
static java.lang.Object |
getMultinameAttribute(java.util.Map<java.lang.String,java.lang.Object> obj,
java.lang.String... equivalentNames) |
static java.lang.Iterable<java.lang.Object> |
parseAll(java.io.Reader yaml)
|
static java.lang.Iterable<java.lang.Object> |
parseAll(java.lang.String yaml)
simplifies new Yaml().loadAll, and converts to list to prevent single-use iterable bug in yaml
|
static java.lang.Object |
removeMultinameAttribute(java.util.Map<java.lang.String,java.lang.Object> obj,
java.lang.String... equivalentNames) |
public static <T> T getAs(java.lang.Object x, java.lang.Class<T> type)
if the object is an iterable containing a single element, and the type is not an iterable, this will attempt to unwrap it.
java.lang.IllegalArgumentException
- if the input is an iterable not containing a single element,
and the cast is requested to a non-iterable typejava.lang.ClassCastException
- if cannot be castedpublic static void dump(int depth, java.lang.Object r)
public static java.lang.Iterable<java.lang.Object> parseAll(java.lang.String yaml)
public static java.lang.Iterable<java.lang.Object> parseAll(java.io.Reader yaml)
public static java.lang.Object removeMultinameAttribute(java.util.Map<java.lang.String,java.lang.Object> obj, java.lang.String... equivalentNames)
public static java.lang.Object getMultinameAttribute(java.util.Map<java.lang.String,java.lang.Object> obj, java.lang.String... equivalentNames)