clojure.lang
Class Atom

java.lang.Object
  extended by clojure.lang.AReference
      extended by clojure.lang.ARef
          extended by clojure.lang.Atom
All Implemented Interfaces:
IAtom, IDeref, IMeta, IRef, IReference

public final class Atom
extends ARef
implements IAtom


Field Summary
 
Fields inherited from class clojure.lang.ARef
validator
 
Constructor Summary
Atom(Object state)
           
Atom(Object state, IPersistentMap meta)
           
 
Method Summary
 boolean compareAndSet(Object oldv, Object newv)
           
 Object deref()
           
 Object reset(Object newval)
           
 Object swap(IFn f)
           
 Object swap(IFn f, Object arg)
           
 Object swap(IFn f, Object arg1, Object arg2)
           
 Object swap(IFn f, Object x, Object y, ISeq args)
           
 
Methods inherited from class clojure.lang.ARef
addWatch, getValidator, getWatches, notifyWatches, removeWatch, setValidator
 
Methods inherited from class clojure.lang.AReference
alterMeta, meta, resetMeta
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Atom

public Atom(Object state)

Atom

public Atom(Object state,
            IPersistentMap meta)
Method Detail

deref

public Object deref()
Specified by:
deref in interface IDeref

swap

public Object swap(IFn f)
Specified by:
swap in interface IAtom

swap

public Object swap(IFn f,
                   Object arg)
Specified by:
swap in interface IAtom

swap

public Object swap(IFn f,
                   Object arg1,
                   Object arg2)
Specified by:
swap in interface IAtom

swap

public Object swap(IFn f,
                   Object x,
                   Object y,
                   ISeq args)
Specified by:
swap in interface IAtom

compareAndSet

public boolean compareAndSet(Object oldv,
                             Object newv)
Specified by:
compareAndSet in interface IAtom

reset

public Object reset(Object newval)
Specified by:
reset in interface IAtom


Copyright © 2015. All Rights Reserved.