|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.lucene.util.collections.IntArray
public class IntArray
A Class wrapper for a grow-able int[] which can be sorted and intersect with other IntArrays.
| Constructor Summary | |
|---|---|
IntArray()
Construct a default IntArray, size 0 and surly a sort should not occur. |
|
| Method Summary | |
|---|---|
void |
addToArray(int value)
Adds a value to the array. |
void |
clear(boolean resize)
Clear the IntArray (set all elements to zero). |
boolean |
equals(Object o)
Equals method. |
int |
get(int i)
Get an element from a specific index. |
int |
hashCode()
Calculates a hash-code for HashTables |
void |
intersect(IntArray other)
Intersects the data with a given IntArray |
void |
intersect(IntHashSet set)
Intersects the data with a given IntHashSet. |
void |
set(int idx,
int value)
|
int |
size()
Return the size of the Array. |
void |
sort()
Sorts the data. |
String |
toString()
toString or not toString. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public IntArray()
| Method Detail |
|---|
public void intersect(IntHashSet set)
IntHashSet.
set - A given ArrayHashSetInt which holds the data to be intersected
againstpublic void intersect(IntArray other)
other - A given IntArray which holds the data to be intersected againspublic int size()
public void addToArray(int value)
value - value to be addedpublic boolean equals(Object o)
equals in class Objectpublic void sort()
public int hashCode()
hashCode in class Objectpublic int get(int i)
i - index of which element should be retrieved.
public void set(int idx,
int value)
public String toString()
toString in class Objectpublic void clear(boolean resize)
resize - - if resize is true, then clear actually allocates
a new array of size 0, essentially 'clearing' the array and freeing
memory.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||