Package datomic
Class Util
java.lang.Object
datomic.Util
Utilities for creating and using data structures.
-
Method Summary
Modifier and TypeMethodDescriptionstatic List
Creates an immutable List.static Map
Creates an immutable Map.static String
Returns the name part of a keyword or symbol.static String
Returns the namespace part of a keyword or symbol.static Object
Reads one item from source, returning it.static List
Reads all the data in reader, returning a List.static Stream
Create a stream on an immutable Iterable.
-
Method Details
-
name
Returns the name part of a keyword or symbol.- Parameters:
k
- - a keyword or symbol- Returns:
- the name
-
namespace
Returns the namespace part of a keyword or symbol.- Parameters:
k
- - a Keyword- Returns:
- the namespace
-
list
Creates an immutable List.- Parameters:
items
- - Objects to be included in the List- Returns:
- an unmodifiable List
-
map
Creates an immutable Map.- Parameters:
keyvals
- - pairs to include in the Map, written as key1, value1, key2, value2, and so on- Returns:
- an unmodifiable Map
-
read
Reads one item from source, returning it.- Parameters:
source
- an edn string- Returns:
- the object read
-
readAll
Reads all the data in reader, returning a List. Closes reader.- Parameters:
reader
- - the edn data to parse.- Returns:
- a List for the parsed data.
-
streamOn
Create a stream on an immutable Iterable.- Parameters:
it
- an Iterator- Returns:
- a sequential Stream
-