Exemple #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);
 }
Exemple #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);
 }
Exemple #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);
 }
Exemple #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);
 }
Exemple #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);
 }