File tree Expand file tree Collapse file tree 4 files changed +22
-22
lines changed
Expand file tree Collapse file tree 4 files changed +22
-22
lines changed Original file line number Diff line number Diff line change 1818 (count [_]
1919 (.count ral))
2020
21- (cons [_ o]
22- (throw ( UnsupportedOperationException. " XITDBArrayList is read-only " )))
21+ (cons [this o]
22+ (cons o ( common/materialize this )))
2323
24- (empty [_ ]
25- ( throw ( UnsupportedOperationException. " XITDBArrayList is read-only " )) )
24+ (empty [this ]
25+ [] )
2626
2727 (equiv [this other]
2828 (and (sequential? other)
3333
3434 clojure.lang.IPersistentVector
3535 (assocN [this i val]
36- (throw ( UnsupportedOperationException. " XITDBArrayList is read-only " ) ))
36+ (assoc ( common/materialize this) i val ))
3737
3838 (length [this]
3939 (.count ral))
Original file line number Diff line number Diff line change 3535 (clojure.lang.MapEntry. key v))))
3636
3737 (assoc [this k v]
38- (throw ( UnsupportedOperationException. " XITDBHashMap is read-only " ) ))
38+ (assoc ( common/materialize this) k v ))
3939
4040 clojure.lang.IPersistentMap
41- (without [_ _ ]
42- (throw ( UnsupportedOperationException. " XITDBHashMap is read-only " ) ))
41+ (without [this k ]
42+ (dissoc ( common/materialize this) k ))
4343
4444 (count [this]
4545 (operations/map-item-count rhm))
4646
4747 clojure.lang.IPersistentCollection
48- (cons [_ _ ]
49- (throw ( UnsupportedOperationException. " XITDBHashMap is read-only " )))
48+ (cons [this o ]
49+ (cons o ( common/materialize this )))
5050
51- (empty [_ ]
52- ( throw ( UnsupportedOperationException. " XITDBHashMap is read-only " )) )
51+ (empty [this ]
52+ {} )
5353
5454 (equiv [this other]
5555 (and (instance? clojure.lang.IPersistentMap other)
Original file line number Diff line number Diff line change 1515
1616(deftype XITDBHashSet [^ReadHashSet rhs]
1717 clojure.lang.IPersistentSet
18- (disjoin [_ k]
19- (throw ( UnsupportedOperationException. " XITDBHashSet is read-only " ) ))
18+ (disjoin [this k]
19+ (disj ( common/materialize this) k ))
2020
2121 (contains [this k]
2222 (operations/set-contains? rhs k))
2626 k))
2727
2828 clojure.lang.IPersistentCollection
29- (cons [_ o]
30- (throw ( UnsupportedOperationException. " XITDBHashSet is read-only " )))
29+ (cons [this o]
30+ (cons o ( common/materialize this )))
3131
32- (empty [_ ]
33- ( throw ( UnsupportedOperationException. " XITDBHashSet is read-only " )) )
32+ (empty [this ]
33+ #{} )
3434
3535 (equiv [this other]
3636 (and (instance? clojure.lang.IPersistentSet other)
Original file line number Diff line number Diff line change 1919 (count [_]
2020 (.count rlal))
2121
22- (cons [_ o]
23- (throw ( UnsupportedOperationException. " XITDBLinkedArrayList is read-only " )))
22+ (cons [this o]
23+ (cons o ( common/materialize this )))
2424
25- (empty [_ ]
26- ( throw ( UnsupportedOperationException. " XITDBLinkedArrayList is read-only " ) ))
25+ (empty [this ]
26+ '( ))
2727
2828 (equiv [this other]
2929 (and (sequential? other)
You can’t perform that action at this time.
0 commit comments