Dataman
Class DatamanKey

java.lang.Object
  extended by Dataman.DatamanKey

public class DatamanKey
extends java.lang.Object

The index key datatype. This class is used to retrieve or remove a key from an index. An index is allowed to have duplicate keys. If searching through many duplicates, you save the system key for later use, it will refer to that particular instance.


Constructor Summary
DatamanKey()
          Create an empty key.
DatamanKey(DatamanKey k)
          Copy constructor from another key
DatamanKey(java.lang.String string)
          Create a key from an arbitrary String
 
Method Summary
 java.lang.String keyStr()
          Return the String representation of the current key.
 boolean match(java.lang.String tem)
          Simple Key pattern matching.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DatamanKey

public DatamanKey()
Create an empty key.


DatamanKey

public DatamanKey(java.lang.String string)
Create a key from an arbitrary String

Parameters:
string - - the string to initialize the key to.

DatamanKey

public DatamanKey(DatamanKey k)
Copy constructor from another key

Parameters:
k - - the key to copy.
Method Detail

keyStr

public java.lang.String keyStr()
Return the String representation of the current key.

Returns:
String

match

public boolean match(java.lang.String tem)
Simple Key pattern matching. The argument is the template to match against. Any single character may be wildcarded with an '*' character. The match is true if the key matches the template up to the length of the template. If the keyStr is longer than the template it is not a match.

Parameters:
tem - - the template to match against.
Returns:
true if the key matched the template, else false