|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.space4j.indexing.Index<E>
public class Index<E>
An object representing an Index in the system. An index contains a name, a classname, and a set o attributes. Index can be simple or compound.
| Nested Class Summary | |
|---|---|
static class |
Index.TYPE
|
| Constructor Summary | |
|---|---|
Index(java.lang.String name,
java.lang.Object source,
Index.TYPE type,
java.lang.Class<? extends java.lang.Object> klass,
java.lang.String... attributes)
Create a new Index. |
|
Index(java.lang.String name,
java.lang.Object source,
Index.TYPE type,
java.util.Comparator<Key> comp,
java.lang.Class<? extends java.lang.Object> klass,
java.lang.String... attributes)
|
|
| Method Summary | ||
|---|---|---|
boolean |
equals(java.lang.Object obj)
|
|
java.lang.String[] |
getAttributes()
Return the attributes of this index. |
|
java.lang.String |
getClassName()
Return the name of the class of this index. |
|
java.util.Comparator<Key> |
getComparator()
|
|
Key |
getKey(java.lang.Object value)
Get a key to be used by this index for a given object. |
|
|
getMap()
|
|
protected
|
getMap(Index.TYPE type,
java.util.Comparator<Key> comparator)
|
|
java.lang.String |
getName()
Return the name of this index. |
|
java.lang.Object |
getSource()
|
|
Index.TYPE |
getType()
|
|
protected java.lang.String |
getTypeName(Index.TYPE type)
|
|
boolean |
hasAttribute(java.lang.String attribute)
Check if this index contains a given attribute. |
|
int |
hashCode()
|
|
java.lang.String |
toString()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Index(java.lang.String name,
java.lang.Object source,
Index.TYPE type,
java.lang.Class<? extends java.lang.Object> klass,
java.lang.String... attributes)
name - The name of this index.klass - The class of this index.attributes - An array of attributes.
public Index(java.lang.String name,
java.lang.Object source,
Index.TYPE type,
java.util.Comparator<Key> comp,
java.lang.Class<? extends java.lang.Object> klass,
java.lang.String... attributes)
| Method Detail |
|---|
public java.util.Comparator<Key> getComparator()
public java.lang.Object getSource()
public Index.TYPE getType()
public <T> T getMap()
protected java.lang.String getTypeName(Index.TYPE type)
protected <T> T getMap(Index.TYPE type,
java.util.Comparator<Key> comparator)
public java.lang.String getName()
public java.lang.String getClassName()
public java.lang.String[] getAttributes()
public boolean hasAttribute(java.lang.String attribute)
attribute - The attribute we are looking for.
public Key getKey(java.lang.Object value)
value - The object from which we want a key.
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic 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 | |||||||||