com.partnersoft.maps.rover
Interface RoverStringIndex


public interface RoverStringIndex

An indexed relation from String keys to RoverEntity objects.

These are designed to be high-performance and appropriate for e.g. incremental search features as well as for internal lookups. Keys may not be unique, and entities may appear multiple times, so effectively the relation is many-to-many. Generally only a subset of data types is contained in an index so the index can be used as a filter in that manner as well.

Copyright 2008-2009 Partner Software, Inc.

Version:
$Id$
Author:
Paul Reavis

Method Summary
 RoverEntity entityAt(int index)
          Returns the entity associated with the given numeric index.
 int firstIndexWithPrefix(java.lang.String prefix)
          Returns the first numeric index with the given name prefix.
 int getId()
          Numeric ID for this index.
 java.lang.String getName()
          Name of this index.
 int idAt(int index)
          Returns the String name at the given numeric index.
 java.util.List<RoverEntity> listEntitiesFor(java.lang.String name)
          Lists the entities matched with the given name.
 java.util.List<java.lang.Integer> listIdsFor(java.lang.String name)
          Lists the data IDs matched with the given name.
 java.util.List<java.lang.Integer> listIndicesContaining(java.lang.String substring)
          Lists the numeric indices containing the given substring in their names.
 java.util.List<java.lang.Integer> listIndicesContainingRegex(java.lang.String regex)
          Lists the numeric indices containing the given substring regular expression in their names.
 java.util.List<java.lang.Integer> listIndicesFor(java.lang.String name)
          Lists the numeric indices matched with the given name.
 java.util.List<java.lang.Integer> listIndicesMatching(java.lang.String string)
          Lists the numeric indices exactly matching (case-insensitively) the given String.
 java.util.List<java.lang.Integer> listIndicesMatchingRegex(java.lang.String regex)
          Lists the numeric indices exactly matching (case-insensitively) the given regular expression.
 java.lang.String nameAt(int index)
          Returns the String name at the given numeric index.
 int size()
          Number of entries in this index.
 

Method Detail

getName

java.lang.String getName()
Name of this index.

Returns:

getId

int getId()
Numeric ID for this index.

Returns:

size

int size()
Number of entries in this index.

Returns:

nameAt

java.lang.String nameAt(int index)
Returns the String name at the given numeric index.

Parameters:
index -
Returns:

idAt

int idAt(int index)
Returns the String name at the given numeric index.

Parameters:
index -
Returns:

entityAt

RoverEntity entityAt(int index)
Returns the entity associated with the given numeric index.

Parameters:
index -
Returns:

listIdsFor

java.util.List<java.lang.Integer> listIdsFor(java.lang.String name)
Lists the data IDs matched with the given name.

Parameters:
name -
Returns:

listIndicesFor

java.util.List<java.lang.Integer> listIndicesFor(java.lang.String name)
Lists the numeric indices matched with the given name.

Parameters:
name -
Returns:

listEntitiesFor

java.util.List<RoverEntity> listEntitiesFor(java.lang.String name)
Lists the entities matched with the given name.

Parameters:
name -
Returns:

firstIndexWithPrefix

int firstIndexWithPrefix(java.lang.String prefix)
Returns the first numeric index with the given name prefix. Use this for incremental-search features.

Parameters:
prefix -
Returns:

listIndicesContaining

java.util.List<java.lang.Integer> listIndicesContaining(java.lang.String substring)
Lists the numeric indices containing the given substring in their names. Depending on storage format, this may not be a fast operation.

Parameters:
substring -
Returns:

listIndicesContainingRegex

java.util.List<java.lang.Integer> listIndicesContainingRegex(java.lang.String regex)
Lists the numeric indices containing the given substring regular expression in their names. Depending on storage format, this may not be a fast operation.

Returns:

listIndicesMatching

java.util.List<java.lang.Integer> listIndicesMatching(java.lang.String string)
Lists the numeric indices exactly matching (case-insensitively) the given String.

Returns:

listIndicesMatchingRegex

java.util.List<java.lang.Integer> listIndicesMatchingRegex(java.lang.String regex)
Lists the numeric indices exactly matching (case-insensitively) the given regular expression. Depending on storage format, this may not be a fast operation.

Returns: