org.apache.jackrabbit.core.persistence.bundle.util
Interface StringIndex

All Known Implementing Classes:
DbNameIndex, HashMapIndex, NamespaceIndex, NGKDbNameIndex, PostgreSQLNameIndex

public interface StringIndex

The StringIndex defines a very simple interface that mapps strings to an integer and vice versa. the mapping must be unique and stable across repository restarts.


Field Summary
static String CVS_ID
          the cvs/svn id
 
Method Summary
 String indexToString(int idx)
          Returns the string for a given index.
 int stringToIndex(String string)
          Returns the index for a given string.
 

Field Detail

CVS_ID

static final String CVS_ID
the cvs/svn id

See Also:
Constant Field Values
Method Detail

stringToIndex

int stringToIndex(String string)
Returns the index for a given string. if the string does not exist in the underlying index map a new index needs to be created.

Parameters:
string - the string to return the index for
Returns:
the index of that string.

indexToString

String indexToString(int idx)
Returns the string for a given index. if the index does not exist in the underlying index map, null is returned.

Parameters:
idx - the index tp returns the string for.
Returns:
the string or null


Copyright © 2004-2008 The Apache Software Foundation. All Rights Reserved.