EMPTY_LIST
Constructor and Description |
---|
DiffListByArrayList(int initialCapacity) |
Modifier and Type | Method and Description |
---|---|
void |
addFirst(T t)
Adds an element at the beginning of the list.
|
boolean |
addLast(T t)
Adds an element at the end of the list.
|
int |
binarySearch(int i)
Searches the list for the specified object using the binary
search algorithm.
|
T |
get(int i)
Returns the element at the specified position in this list.
|
List<T> |
getMinListForRange(int startIndex,
int endIndex,
INodeDirectory dir)
Returns the list of minimal list of elements need to combine to generate
cumulative sum from startIndex to endIndex.
|
boolean |
isEmpty()
Returns true if this list contains no elements.
|
Iterator<T> |
iterator() |
T |
remove(int i)
Removes the element at the specified position in this list.
|
int |
size()
Returns the number of elements in this list.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
emptyList, unmodifiableList
forEach, spliterator
public T get(int i)
DiffList
get
in interface DiffList<T extends Comparable<Integer>>
i
- index of the element to returnpublic boolean isEmpty()
DiffList
isEmpty
in interface DiffList<T extends Comparable<Integer>>
public int size()
DiffList
size
in interface DiffList<T extends Comparable<Integer>>
public T remove(int i)
DiffList
remove
in interface DiffList<T extends Comparable<Integer>>
i
- the index of the element to be removedpublic boolean addLast(T t)
DiffList
addLast
in interface DiffList<T extends Comparable<Integer>>
t
- element to be appended to this listpublic void addFirst(T t)
DiffList
addFirst
in interface DiffList<T extends Comparable<Integer>>
t
- element to be added to this listpublic int binarySearch(int i)
DiffList
binarySearch
in interface DiffList<T extends Comparable<Integer>>
i
- key to be searched forpublic Iterator<T> iterator()
iterator
in interface Iterable<T extends Comparable<Integer>>
public List<T> getMinListForRange(int startIndex, int endIndex, INodeDirectory dir)
DiffList
getMinListForRange
in interface DiffList<T extends Comparable<Integer>>
Copyright © 2008–2022 Apache Software Foundation. All rights reserved.