Esempio n. 1
0
 /**
  * @return A singleton {@link PersistentMap} associating the given key with the given value;
  *     implemented as hash map.
  */
 public static <K, V> PersistentMap<K, V> hashMap(K key, V val) {
   return Persistents.<K, V>hashMap().plus(key, val);
 }
Esempio n. 2
0
 /** @return A singleton {@link PersistentSet} with the value val; implemented as hash set. */
 public static <E> PersistentSet<E> hashSet(E val) {
   return Persistents.<E>hashSet().plus(val);
 }
Esempio n. 3
0
 /** @return An singleton {@link PersistentList} with the value val; implemented as linked list. */
 public static <E> PersistentList<E> linkedList(E val) {
   return Persistents.<E>linkedList().plus(val);
 }
Esempio n. 4
0
 /** @return A singleton {@link PersistentVector} with the value val. */
 public static <E> PersistentVector<E> vector(E val) {
   return Persistents.<E>vector().plus(val);
 }
Esempio n. 5
0
 /**
  * @return A singleton {@link PersistentSortedMap} associating the given key with the given value;
  *     implemented as tree map.
  */
 public static <K, V> PersistentSortedMap<K, V> treeMap(K key, V val) {
   return Persistents.<K, V>treeMap().plus(key, val);
 }