public final class FlatHashList extends java.lang.Object implements ListOfHash
| Constructor and Description | 
|---|
FlatHashList(int depth,
            int capacity)
The capacity of the flat list, i.e. its maximum size, i.e the length of
 the internal array used to store the list elements. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
arraycopy(int srcPos,
         long[] dest,
         int destPos,
         int length)
Similar to  
System.arraycopy(Object, int, Object, int, int) except that the source
 is the internal list. | 
int | 
capacity()
Returns the maximum number of elements that can be stored in this list. 
 | 
void | 
clear()  | 
long | 
get(int i)
Returns the element at the given index  
i in the list. | 
FlatHashIterator | 
iterator()  | 
FlatHashList | 
put(ListOfHash hashes)  | 
FlatHashList | 
put(long hash)  | 
int | 
size()
Returns the current number of elements in the flat list. 
 | 
void | 
sortByHashAsc()  | 
java.lang.String | 
toString()  | 
public FlatHashList(int depth,
                    int capacity)
depth - depth of the hash in the list.capacity - maximum size the list.public int capacity()
public void clear()
public FlatHashList put(long hash)
public FlatHashList put(ListOfHash hashes)
public void sortByHashAsc()
public int size()
ListOfHashsize in interface ListOfHashpublic long get(int i)
ListOfHashi in the list.get in interface ListOfHashi - index in the list of the element to be returned.i in the list.public void arraycopy(int srcPos,
                      long[] dest,
                      int destPos,
                      int length)
ListOfHashSystem.arraycopy(Object, int, Object, int, int) except that the source
 is the internal list.arraycopy in interface ListOfHashsrcPos - see System.arraycopy(Object, int, Object, int, int)dest - see System.arraycopy(Object, int, Object, int, int)destPos - see System.arraycopy(Object, int, Object, int, int)length - see System.arraycopy(Object, int, Object, int, int)public FlatHashIterator iterator()
iterator in interface FlatHashIterablepublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2018 F.-X. Pineau, CDS, Observatoire Astronomique de Strasbourg, Universite de Strasbourg, CNRS. All Rights Reserved.