com.browseengine.bobo.facets.data
Class TermFixedLengthLongArrayList
java.lang.Object
com.browseengine.bobo.facets.data.TermValueList<long[]>
com.browseengine.bobo.facets.data.TermFixedLengthLongArrayList
- All Implemented Interfaces:
- Iterable<String>, Collection<String>, List<String>
public class TermFixedLengthLongArrayList
- extends TermValueList<long[]>
| Methods inherited from class com.browseengine.bobo.facets.data.TermValueList |
add, addAll, addAll, contains, containsAll, getInnerList, getType, indexOfWithOffset, isEmpty, lastIndexOf, listIterator, listIterator, main, remove, remove, removeAll, retainAll, set, subList, toArray |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_elements
protected long[] _elements
width
protected int width
TermFixedLengthLongArrayList
public TermFixedLengthLongArrayList(int width)
TermFixedLengthLongArrayList
public TermFixedLengthLongArrayList(int width,
int capacity)
parse
protected long[] parse(String s)
add
public boolean add(String o)
- Description copied from class:
TermValueList
- Add a new value to the list. It is important to add the values in sorted (ASC) order.
Our algorithm uses binary searches and priority queues, both of which fails when the ordering is wrong.
- Specified by:
add in interface Collection<String>- Specified by:
add in interface List<String>- Specified by:
add in class TermValueList<long[]>
buildPrimitiveList
protected List<?> buildPrimitiveList(int capacity)
- Specified by:
buildPrimitiveList in class TermValueList<long[]>
clear
public void clear()
- Specified by:
clear in interface Collection<String>- Specified by:
clear in interface List<String>- Overrides:
clear in class TermValueList<long[]>
get
public String get(int index)
- Specified by:
get in interface List<String>- Overrides:
get in class TermValueList<long[]>
getRawValue
public long[] getRawValue(int index)
- Overrides:
getRawValue in class TermValueList<long[]>
iterator
public Iterator<String> iterator()
- Specified by:
iterator in interface Iterable<String>- Specified by:
iterator in interface Collection<String>- Specified by:
iterator in interface List<String>- Overrides:
iterator in class TermValueList<long[]>
size
public int size()
- Specified by:
size in interface Collection<String>- Specified by:
size in interface List<String>- Overrides:
size in class TermValueList<long[]>
toArray
public Object[] toArray()
- Specified by:
toArray in interface Collection<String>- Specified by:
toArray in interface List<String>- Overrides:
toArray in class TermValueList<long[]>
toArray
public long[][] toArray(long[][] a)
format
public String format(Object o)
- Specified by:
format in class TermValueList<long[]>
getPrimitiveValue
public long[] getPrimitiveValue(int index)
binarySearch
protected int binarySearch(long[] key)
binarySearch
protected int binarySearch(long[] key,
int low,
int high)
indexOf
public int indexOf(Object o)
- Specified by:
indexOf in interface List<String>- Specified by:
indexOf in class TermValueList<long[]>
indexOf
public int indexOf(long[] val)
indexOfWithType
public int indexOfWithType(long[] val)
- Specified by:
indexOfWithType in class TermValueList<long[]>
seal
public void seal()
- Specified by:
seal in class TermValueList<long[]>
contains
public boolean contains(long[] val)
containsWithType
public boolean containsWithType(long[] val)
- Specified by:
containsWithType in class TermValueList<long[]>
Copyright © 2011. All Rights Reserved.