public class FieldSearchKey<T> extends java.lang.Object implements IDestructableField
| Modifier and Type | Field and Description |
|---|---|
protected int |
offset |
| Modifier and Type | Method and Description |
|---|---|
static <T,B extends NdNode> |
create(StructDef<B> builder,
FieldSearchIndex<B> searchIndex)
Creates a search key attribute in the given struct which stores an entry in the given global search index
|
void |
destruct(Nd nd,
long address) |
IString |
get(Nd nd,
long address) |
java.lang.String |
getFieldName()
Returns the name of the field.
|
int |
getOffset()
Returns the field offset, in bytes from the start of the struct.
|
int |
getRecordSize()
Returns the size of the field, in bytes.
|
boolean |
isInIndex(Nd nd,
long address)
Returns true iff this key is currently in the index
|
void |
put(Nd nd,
long address,
char[] newString)
Sets the value of the key and inserts it into the index if it is not already present
|
void |
put(Nd nd,
long address,
java.lang.String newString) |
void |
removeFromIndex(Nd nd,
long address)
Clears this key and removes it from the search index
|
protected void |
setFieldName(java.lang.String fieldName) |
void |
setOffset(int offset)
Sets the field offset (bytes from the start of the struct).
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAlignmentpublic static <T,B extends NdNode> FieldSearchKey<T> create(StructDef<B> builder, FieldSearchIndex<B> searchIndex)
public void put(Nd nd, long address, java.lang.String newString)
public void put(Nd nd, long address, char[] newString)
public void destruct(Nd nd, long address)
destruct in interface IDestructableFieldpublic void removeFromIndex(Nd nd, long address)
public boolean isInIndex(Nd nd, long address)
public int getRecordSize()
IFieldgetRecordSize in interface IFieldprotected final void setFieldName(java.lang.String fieldName)
public final void setOffset(int offset)
IFieldpublic final int getOffset()
IFieldpublic final java.lang.String getFieldName()
IFieldgetFieldName in interface IField