|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jgit.storage.dht.spi.util.ColumnMatcher
public class ColumnMatcher
Utility to deal with columns named as byte arrays.
Constructor Summary | |
---|---|
ColumnMatcher(java.lang.String nameStr)
Create a new column matcher for the given named string. |
Method Summary | |
---|---|
byte[] |
append(byte[] suffix)
Append a suffix onto this column name. |
byte[] |
append(RowKey suffix)
Append a suffix onto this column name. |
byte[] |
name()
|
boolean |
sameFamily(byte[] col)
Check if the column is a member of this family. |
boolean |
sameName(byte[] col)
Check if the column is an exact match. |
byte[] |
suffix(byte[] col)
Extract the portion of the column name that comes after the family. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ColumnMatcher(java.lang.String nameStr)
nameStr
- the column name, as a string.Method Detail |
---|
public byte[] name()
public boolean sameName(byte[] col)
col
- the column as read from the database.
col
is exactly the same as this column.public boolean sameFamily(byte[] col)
This method checks that name()
(the string supplied to the
constructor) is a prefix of col
.
col
- the column as read from the database.
col
is a member of this column family.public byte[] suffix(byte[] col)
col
- the column as read from the database.
public byte[] append(RowKey suffix)
suffix
- name component to appear after the family name.
public byte[] append(byte[] suffix)
suffix
- name component to appear after the family name.
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |