net.sf.jannot
Class MemoryFeatureAnnotation
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<T>
net.sf.jannot.MemoryListData<Feature>
net.sf.jannot.MemoryFeatureAnnotation
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<Feature>, java.util.Collection<Feature>, java.util.List<Feature>, java.util.RandomAccess, Data<Feature>, DensityEstimate, FeatureAnnotation
public class MemoryFeatureAnnotation
- extends MemoryListData<Feature>
- implements FeatureAnnotation
- See Also:
- Serialized Form
Fields inherited from class java.util.AbstractList |
modCount |
Methods inherited from class java.util.ArrayList |
add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize |
Methods inherited from class java.util.AbstractList |
equals, hashCode, iterator, listIterator, listIterator, subList |
Methods inherited from class java.util.AbstractCollection |
containsAll, removeAll, retainAll |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList |
MemoryFeatureAnnotation
public MemoryFeatureAnnotation()
get
public java.lang.Iterable<Feature> get(int start,
int end)
- Description copied from interface:
Data
- Gets data. The selected data should cover [start,end[. The coordinates
are one based.
- Specified by:
get
in interface Data<Feature>
- Overrides:
get
in class MemoryListData<Feature>
- Parameters:
start
- the start coordinate, this one will be included. This is a
one-based coordinate.end
- the end coordinate, this one will not be included. This is a
one-based coordinate.
- Returns:
- the selected data.
get
public java.lang.Iterable<Feature> get()
- Specified by:
get
in interface Data<Feature>
- Overrides:
get
in class MemoryListData<Feature>
add
public boolean add(Feature f)
- Specified by:
add
in interface java.util.Collection<Feature>
- Specified by:
add
in interface java.util.List<Feature>
- Overrides:
add
in class java.util.ArrayList<Feature>
- Parameters:
f
-
- Returns:
remove
public void remove(Feature f)
- Parameters:
f
-
cachedCount
public int cachedCount()
- Returns the number of features that resides in memory.
- Returns:
getCached
public Feature getCached(int row)
- Parameters:
row
-
- Returns:
getCachedIndexOf
public int getCachedIndexOf(Feature first)
- Parameters:
first
-
- Returns:
getEstimateCount
public int getEstimateCount(Location l)
- Specified by:
getEstimateCount
in interface DensityEstimate
getMaximumCoordinate
public int getMaximumCoordinate()
- Specified by:
getMaximumCoordinate
in interface DensityEstimate
getMaxScore
public double getMaxScore()
- Description copied from interface:
FeatureAnnotation
- Gives the most reliable estimate of the maximum score. For memory based
containers, this value should be accurate for indexed structure a best
effort will suffice.
At least all features that have been returned before the invocation of
this method should be within range of getMinScore and getMaxScore.
- Specified by:
getMaxScore
in interface FeatureAnnotation
- Returns:
getMinScore
public double getMinScore()
- Description copied from interface:
FeatureAnnotation
- Gives the most reliable estimate of the mininum score. For memory based
containers, this value should be accurate for indexed structure a best
effort will suffice.
At least all features that have been returned before the invocation of
this method should be within range of getMinScore and getMaxScore.
- Specified by:
getMinScore
in interface FeatureAnnotation
- Returns:
toString
public java.lang.String toString()
- Overrides:
toString
in class java.util.AbstractCollection<Feature>
qualifierKeys
public java.util.Set<java.lang.String> qualifierKeys()
- Description copied from interface:
FeatureAnnotation
- List of keys of qualifiers that are oresent in this data set. In case of indexed
structures at least all qualifier keys that have appeared so far, should be in the
list.
- Specified by:
qualifierKeys
in interface FeatureAnnotation
- Returns:
canSave
public boolean canSave()
- Specified by:
canSave
in interface Data<Feature>
- Overrides:
canSave
in class MemoryListData<Feature>
- Returns:
label
public java.lang.String label()
- Specified by:
label
in interface Data<Feature>
Copyright © 2007-2011 - Thomas Abeel - All Rights Reserved.