clojure.lang
Class PersistentQueue
java.lang.Object
clojure.lang.Obj
clojure.lang.PersistentQueue
- All Implemented Interfaces:
- Counted, IHashEq, IMeta, IObj, IPersistentCollection, IPersistentList, IPersistentStack, Seqable, Sequential, Serializable, Iterable, Collection
public class PersistentQueue
- extends Obj
- implements IPersistentList, Collection, Counted, IHashEq
conses onto rear, peeks/pops from front
See Okasaki's Batched Queues
This differs in that it uses a PersistentVector as the rear, which is in-order,
so no reversing or suspensions required for persistent use
- See Also:
- Serialized Form
Methods inherited from class clojure.lang.Obj |
meta |
EMPTY
public static final PersistentQueue EMPTY
equiv
public boolean equiv(Object obj)
- Specified by:
equiv
in interface IPersistentCollection
equals
public boolean equals(Object obj)
- Specified by:
equals
in interface Collection
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Specified by:
hashCode
in interface Collection
- Overrides:
hashCode
in class Object
hasheq
public int hasheq()
- Specified by:
hasheq
in interface IHashEq
peek
public Object peek()
- Specified by:
peek
in interface IPersistentStack
pop
public PersistentQueue pop()
- Specified by:
pop
in interface IPersistentStack
count
public int count()
- Specified by:
count
in interface Counted
- Specified by:
count
in interface IPersistentCollection
seq
public ISeq seq()
- Specified by:
seq
in interface Seqable
cons
public PersistentQueue cons(Object o)
- Specified by:
cons
in interface IPersistentCollection
empty
public IPersistentCollection empty()
- Specified by:
empty
in interface IPersistentCollection
withMeta
public PersistentQueue withMeta(IPersistentMap meta)
- Specified by:
withMeta
in interface IObj
- Specified by:
withMeta
in class Obj
toArray
public Object[] toArray()
- Specified by:
toArray
in interface Collection
add
public boolean add(Object o)
- Specified by:
add
in interface Collection
remove
public boolean remove(Object o)
- Specified by:
remove
in interface Collection
addAll
public boolean addAll(Collection c)
- Specified by:
addAll
in interface Collection
clear
public void clear()
- Specified by:
clear
in interface Collection
retainAll
public boolean retainAll(Collection c)
- Specified by:
retainAll
in interface Collection
removeAll
public boolean removeAll(Collection c)
- Specified by:
removeAll
in interface Collection
containsAll
public boolean containsAll(Collection c)
- Specified by:
containsAll
in interface Collection
toArray
public Object[] toArray(Object[] a)
- Specified by:
toArray
in interface Collection
size
public int size()
- Specified by:
size
in interface Collection
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interface Collection
contains
public boolean contains(Object o)
- Specified by:
contains
in interface Collection
iterator
public Iterator iterator()
- Specified by:
iterator
in interface Iterable
- Specified by:
iterator
in interface Collection
Copyright © 2013. All Rights Reserved.