public class PersistentQueue extends Obj implements IPersistentList, java.util.Collection, Counted, IHashEq
Modifier and Type | Class and Description |
---|---|
(package private) static class |
PersistentQueue.Seq |
Modifier and Type | Field and Description |
---|---|
(package private) int |
_hash |
(package private) int |
_hasheq |
(package private) int |
cnt |
static PersistentQueue |
EMPTY |
(package private) ISeq |
f |
(package private) PersistentVector |
r |
Constructor and Description |
---|
PersistentQueue(IPersistentMap meta,
int cnt,
ISeq f,
PersistentVector r) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(java.lang.Object o) |
boolean |
addAll(java.util.Collection c) |
void |
clear() |
PersistentQueue |
cons(java.lang.Object o) |
boolean |
contains(java.lang.Object o) |
boolean |
containsAll(java.util.Collection c) |
int |
count() |
IPersistentCollection |
empty() |
boolean |
equals(java.lang.Object obj) |
boolean |
equiv(java.lang.Object obj) |
int |
hashCode() |
int |
hasheq() |
boolean |
isEmpty() |
java.util.Iterator |
iterator() |
java.lang.Object |
peek() |
PersistentQueue |
pop() |
boolean |
remove(java.lang.Object o) |
boolean |
removeAll(java.util.Collection c) |
boolean |
retainAll(java.util.Collection c) |
ISeq |
seq() |
int |
size() |
java.lang.Object[] |
toArray() |
java.lang.Object[] |
toArray(java.lang.Object[] a) |
PersistentQueue |
withMeta(IPersistentMap meta) |
public static final PersistentQueue EMPTY
final int cnt
final ISeq f
final PersistentVector r
int _hash
int _hasheq
PersistentQueue(IPersistentMap meta, int cnt, ISeq f, PersistentVector r)
public boolean equiv(java.lang.Object obj)
equiv
in interface IPersistentCollection
public boolean equals(java.lang.Object obj)
equals
in interface java.util.Collection
equals
in class java.lang.Object
public int hashCode()
hashCode
in interface java.util.Collection
hashCode
in class java.lang.Object
public java.lang.Object peek()
peek
in interface IPersistentStack
public PersistentQueue pop()
pop
in interface IPersistentStack
public int count()
count
in interface Counted
count
in interface IPersistentCollection
public PersistentQueue cons(java.lang.Object o)
cons
in interface IPersistentCollection
public IPersistentCollection empty()
empty
in interface IPersistentCollection
public PersistentQueue withMeta(IPersistentMap meta)
public java.lang.Object[] toArray()
toArray
in interface java.util.Collection
public boolean add(java.lang.Object o)
add
in interface java.util.Collection
public boolean remove(java.lang.Object o)
remove
in interface java.util.Collection
public boolean addAll(java.util.Collection c)
addAll
in interface java.util.Collection
public void clear()
clear
in interface java.util.Collection
public boolean retainAll(java.util.Collection c)
retainAll
in interface java.util.Collection
public boolean removeAll(java.util.Collection c)
removeAll
in interface java.util.Collection
public boolean containsAll(java.util.Collection c)
containsAll
in interface java.util.Collection
public java.lang.Object[] toArray(java.lang.Object[] a)
toArray
in interface java.util.Collection
public int size()
size
in interface java.util.Collection
public boolean isEmpty()
isEmpty
in interface java.util.Collection
public boolean contains(java.lang.Object o)
contains
in interface java.util.Collection
public java.util.Iterator iterator()
iterator
in interface java.lang.Iterable
iterator
in interface java.util.Collection