summaryrefslogtreecommitdiff
path: root/src/jvm/clojure
diff options
context:
space:
mode:
authorRich Hickey <richhickey@gmail.com>2006-06-11 21:17:18 +0000
committerRich Hickey <richhickey@gmail.com>2006-06-11 21:17:18 +0000
commitf127034f649276cb1bcde4fea50e6be4637dd5d0 (patch)
treefb072f8eb0ff9a08c22e072188bf3a33d8ab3bf7 /src/jvm/clojure
parent01820bfb5829d8be3bdafdf8fae8046f339a0949 (diff)
renamed get,set et al
Diffstat (limited to 'src/jvm/clojure')
-rw-r--r--src/jvm/clojure/lang/TObj.java14
-rw-r--r--src/jvm/clojure/lang/Transaction.java28
2 files changed, 21 insertions, 21 deletions
diff --git a/src/jvm/clojure/lang/TObj.java b/src/jvm/clojure/lang/TObj.java
index 05dead2e..ed3fd935 100644
--- a/src/jvm/clojure/lang/TObj.java
+++ b/src/jvm/clojure/lang/TObj.java
@@ -19,29 +19,29 @@ public TObj() throws Exception{
public Object put( Object key, Object val) throws Exception {
- IPersistentMap t = (IPersistentMap) Transaction.get2( _attrs);
+ IPersistentMap t = (IPersistentMap) Transaction.get( _attrs);
t = t.put(key, val);
- Transaction.set2(_attrs,t);
+ Transaction.set(_attrs,t);
return val;
}
public Object get( Object key) throws Exception {
- IPersistentMap t = (IPersistentMap) Transaction.get2( _attrs);
+ IPersistentMap t = (IPersistentMap) Transaction.get( _attrs);
return t.get(key);
}
public boolean has( Object key) throws Exception {
- IPersistentMap t = (IPersistentMap) Transaction.get2( _attrs);
+ IPersistentMap t = (IPersistentMap) Transaction.get( _attrs);
return t.contains(key);
}
public IPersistentMap attrs() throws Exception {
- return (IPersistentMap) Transaction.get2(_attrs);
+ return (IPersistentMap) Transaction.get(_attrs);
}
public void remove(Object key) throws Exception {
- IPersistentMap t = (IPersistentMap) Transaction.get2( _attrs);
+ IPersistentMap t = (IPersistentMap) Transaction.get( _attrs);
t = t.remove(key);
- Transaction.set2(_attrs,t);
+ Transaction.set(_attrs,t);
}
}
diff --git a/src/jvm/clojure/lang/Transaction.java b/src/jvm/clojure/lang/Transaction.java
index 3f7862a2..3cfc38e1 100644
--- a/src/jvm/clojure/lang/Transaction.java
+++ b/src/jvm/clojure/lang/Transaction.java
@@ -63,28 +63,28 @@ static public Object runInTransaction(IFn fn) throws Exception{
static public TRef tref(Object val) throws Exception{
Transaction trans = ThreadLocalData.getTransaction();
TRef tref = new TRef();
- trans.set(tref, val);
+ trans.doSet(tref, val);
return tref;
}
//*
-static public Object get2(TRef tref) throws Exception{
+static public Object get(TRef tref) throws Exception{
Transaction trans = ThreadLocalData.getTransaction();
if(trans != null)
- return trans.get(tref);
+ return trans.doGet(tref);
return getCurrent(tref).val;
}
-static public Object set2(TRef tref, Object val) throws Exception{
- return ThreadLocalData.getTransaction().set(tref,val);
+static public Object set(TRef tref, Object val) throws Exception{
+ return ThreadLocalData.getTransaction().doSet(tref,val);
}
-static public void touch2(TRef tref) throws Exception{
- ThreadLocalData.getTransaction().touch(tref);
+static public void touch(TRef tref) throws Exception{
+ ThreadLocalData.getTransaction().doTouch(tref);
}
-static public void commutate2(TRef tref, IFn fn) throws Exception{
- ThreadLocalData.getTransaction().commutate(tref, fn);
+static public void commutate(TRef tref, IFn fn) throws Exception{
+ ThreadLocalData.getTransaction().doCommutate(tref, fn);
}
//*/
@@ -190,7 +190,7 @@ Transaction(){
}
}
-Object get(TRef tref) throws Exception{
+Object doGet(TRef tref) throws Exception{
if(sets != null && sets.containsKey(tref))
return sets.get(tref);
@@ -214,7 +214,7 @@ static TVal getCurrent(TRef tref) throws Exception{
return null;
}
-Object set(TRef tref, Object val) throws Exception{
+Object doSet(TRef tref, Object val) throws Exception{
if(sets == null)
sets = new IdentityHashMap<TRef,Object>();
if(commutates != null && commutates.containsKey(tref))
@@ -224,11 +224,11 @@ Object set(TRef tref, Object val) throws Exception{
return val;
}
-void touch(TRef tref) throws Exception{
- set(tref, get(tref));
+void doTouch(TRef tref) throws Exception{
+ doSet(tref, doGet(tref));
}
-void commutate(TRef tref, IFn fn) throws Exception{
+void doCommutate(TRef tref, IFn fn) throws Exception{
if(commutates == null)
commutates = new IdentityHashMap<TRef,ISeq>();
if(sets != null && sets.containsKey(tref))