Modifier and Type | Field and Description |
---|---|
static StringBuilder |
issueLog
Stores any information relating to non-fatal issues, such as caught and handled Exceptions that still change the
behavior of methods.
|
Constructor and Description |
---|
Maker() |
Modifier and Type | Method and Description |
---|---|
static <K,V> LinkedHashMap<K,V> |
makeLHM()
Makes an empty LinkedHashMap (LHM); needs key and value types to be specified in order to work.
|
static <K,V> LinkedHashMap<K,V> |
makeLHM(K k0,
V v0,
Object... rest)
Makes a LinkedHashMap (LHM) with key and value types inferred from the types of k0 and v0, and considers all
parameters key-value pairs, casting the Objects at positions 0, 2, 4...
|
static <T> LinkedHashSet<T> |
makeLHS(T... elements)
Makes a LinkedHashSet (LHS) of T given an array or vararg of T elements.
|
static <T> ArrayList<T> |
makeList(T... elements)
Makes an ArrayList of T given an array or vararg of T elements.
|
public static final StringBuilder issueLog
public Maker()
public static <K,V> LinkedHashMap<K,V> makeLHM(K k0, V v0, Object... rest)
K
- the type of keys in the returned LinkedHashMap; if not specified, will be inferred from k0V
- the type of values in the returned LinkedHashMap; if not specified, will be inferred from v0k0
- the first key; used to infer the types of other keys if generic parameters aren't specified.v0
- the first value; used to infer the types of other values if generic parameters aren't specified.rest
- an array or vararg of keys and values in pairs; should contain alternating K, V, K, V... elementspublic static <K,V> LinkedHashMap<K,V> makeLHM()
Maker.<String, Coord>makeLHM();
. Using
the new keyword is probably just as easy in this case; this method is provided for completeness relative to
makeLHM() with 2 or more parameters.K
- the type of keys in the returned LinkedHashMap; cannot be inferred and must be specifiedV
- the type of values in the returned LinkedHashMap; cannot be inferred and must be specified@SafeVarargs public static <T> ArrayList<T> makeList(T... elements)
T
- just about any non-primitive typeelements
- an array or vararg of T@SafeVarargs public static <T> LinkedHashSet<T> makeLHS(T... elements)
T
- just about any non-primitive typeelements
- an array or vararg of TCopyright © 2012–2016. All rights reserved.