T - type of elementspublic class RedBlackTreeLongByRange<T> extends Object implements Sorted.AssociatedWithLong<T>
Sorted.AssociatedWithInteger<T>, Sorted.AssociatedWithLong<T>| Constructor and Description |
|---|
RedBlackTreeLongByRange(long rangeSize)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(long value,
T element)
Add an element.
|
void |
clear()
Clear this collection.
|
boolean |
contains(long value,
T element)
Return true if the list contains the element.
|
boolean |
containsInstance(long value,
T element)
Return true if the list contains the given instance.
|
RedBlackTreeLong.Node<T> |
getMax()
Return the last node.
|
RedBlackTreeLong.Node<T> |
getMin()
Return the first node.
|
boolean |
isEmpty()
Return true if this collection is empty.
|
Iterator<T> |
iterator() |
Iterator<T> |
orderedIterator()
Return an iterator that iterates on the correct order.
|
void |
remove(long value,
T element)
Remove the first occurrence of the element.
|
void |
removeInstance(long value,
T element)
Remove the first occurrence of the given instance.
|
void |
removeMax()
Remove the first node.
|
void |
removeMin()
Remove the first node.
|
Iterator<T> |
reverseOrderIterator()
Return an iterator that iterates on the correct order.
|
int |
size()
Number of elements in this collection.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic RedBlackTreeLongByRange(long rangeSize)
public int size()
Sortedpublic boolean isEmpty()
Sortedpublic void clear()
Sortedpublic void add(long value,
T element)
Sorted.AssociatedWithLongadd in interface Sorted.AssociatedWithLong<T>public boolean contains(long value,
T element)
Sorted.AssociatedWithLongcontains in interface Sorted.AssociatedWithLong<T>public boolean containsInstance(long value,
T element)
Sorted.AssociatedWithLongcontainsInstance in interface Sorted.AssociatedWithLong<T>public void remove(long value,
T element)
Sorted.AssociatedWithLongremove in interface Sorted.AssociatedWithLong<T>public void removeInstance(long value,
T element)
Sorted.AssociatedWithLongremoveInstance in interface Sorted.AssociatedWithLong<T>public RedBlackTreeLong.Node<T> getMin()
public RedBlackTreeLong.Node<T> getMax()
public void removeMin()
public void removeMax()
public Iterator<T> orderedIterator()
SortedorderedIterator in interface Sorted<T>Copyright © 2019. All rights reserved.