|
Neo4j Enterprise | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.neo4j.helpers.collection.MapUtil
public abstract class MapUtil
Utility to create Maps.
| Constructor Summary | |
|---|---|
MapUtil()
|
|
| Method Summary | ||
|---|---|---|
static
|
genericMap(Map<K,V> targetMap,
Object... objects)
A short-hand method for adding key/value pairs into a Map. |
|
static
|
genericMap(Object... objects)
A short-hand method for creating a Map of key/value pairs. |
|
static Map<String,String> |
load(File file)
Loads a Map from a File assuming strings as keys
and values. |
|
static Map<String,String> |
load(InputStream stream)
Loads a Map from an InputStream assuming strings as keys
and values. |
|
static Map<String,String> |
load(Reader reader)
Loads a Map from a Reader assuming strings as keys
and values. |
|
static Map<String,String> |
loadStrictly(File file)
Loads a Map from a File assuming strings as keys
and values. |
|
static Map<String,String> |
loadStrictly(InputStream stream)
Loads a Map from an InputStream assuming strings as keys
and values. |
|
static Map<String,String> |
loadStrictly(Reader reader)
Loads a Map from a Reader assuming strings as keys
and values. |
|
static Map<String,Object> |
map(Map<String,Object> targetMap,
Object... objects)
A short-hand method for creating a Map of key/value pairs where
keys are Strings and values are Objects. |
|
static Map<String,Object> |
map(Object... objects)
A short-hand method for creating a Map of key/value pairs where
keys are Strings and values are Objects. |
|
static Map<String,String> |
stringMap(Map<String,String> targetMap,
String... strings)
A short-hand method for creating a Map of key/value pairs where
both keys and values are Strings. |
|
static Map<String,String> |
stringMap(String... strings)
A short-hand method for creating a Map of key/value pairs where
both keys and values are Strings. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MapUtil()
| Method Detail |
|---|
public static <K,V> Map<K,V> genericMap(Object... objects)
Map of key/value pairs.
K - type of keysV - type of valuesobjects - alternating key and value.
objects.
public static <K,V> Map<K,V> genericMap(Map<K,V> targetMap,
Object... objects)
Map.
K - type of keysV - type of valuestargetMap - the Map to put the objects into.objects - alternating key and value.
objects.public static Map<String,String> stringMap(String... strings)
Map of key/value pairs where
both keys and values are Strings.
strings - alternating key and value.
strings.
public static Map<String,String> stringMap(Map<String,String> targetMap,
String... strings)
Map of key/value pairs where
both keys and values are Strings.
targetMap - the Map to put the objects into.strings - alternating key and value.
strings.public static Map<String,Object> map(Object... objects)
Map of key/value pairs where
keys are Strings and values are Objects.
objects - alternating key and value.
objects.
public static Map<String,Object> map(Map<String,Object> targetMap,
Object... objects)
Map of key/value pairs where
keys are Strings and values are Objects.
targetMap - the Map to put the objects into.objects - alternating key and value.
objects.
public static Map<String,String> load(Reader reader)
throws IOException
Map from a Reader assuming strings as keys
and values.
reader - the Reader containing a Properties-like
layout of keys and values.
Map.
IOException - if the reader throws IOException.public static Map<String,String> loadStrictly(Reader reader)
Map from a Reader assuming strings as keys
and values. Any IOException is wrapped and thrown as a
RuntimeException instead.
reader - the Reader containing a Properties-like
layout of keys and values.
Map.
public static Map<String,String> load(InputStream stream)
throws IOException
Map from an InputStream assuming strings as keys
and values.
stream - the InputStream containing a
Properties-like layout of keys and values.
Map.
IOException - if the stream throws IOException.public static Map<String,String> loadStrictly(InputStream stream)
Map from an InputStream assuming strings as keys
and values. Any IOException is wrapped and thrown as a
RuntimeException instead.
stream - the InputStream containing a
Properties-like layout of keys and values.
Map.
public static Map<String,String> load(File file)
throws IOException
Map from a File assuming strings as keys
and values.
file - the File containing a Properties-like
layout of keys and values.
Map.
IOException - if the file reader throws IOException.public static Map<String,String> loadStrictly(File file)
Map from a File assuming strings as keys
and values. Any IOException is wrapped and thrown as a
RuntimeException instead.
file - the File containing a Properties-like
layout of keys and values.
Map.
|
Neo4j Enterprise | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||