Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mindswap.pellet.rete
Class Index<S,T>

    java.lang.Object
      org.mindswap.pellet.rete.Index<S,T>

    public class Index<S,T>

extends java.lang.Object

Title: Index

Description: An indexing structure that associates an object with a list of objects as the key.

Copyright: Copyright (c) 2007

Company: Clark & Parsia, LLC.

Author:
  Ron Alford

Constructor Summary
`Index()`

Method Summary
`boolean` | `add(java.util.List<S> key, T obj)` Add an object to the index.
`
`<U> java.util.Collection<Pair<T,U>>`
` | `join(Index<S,U> index, int shared)` Return a join of this index to the given index, joining on the first `shared` variables.
`java.util.Collection<T>` | `match(java.util.List<S> key)` Return all matches to the key.
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### Index

    public Index()

Method Detail

### add

    public boolean add(java.util.List<S> key,
                       T obj)

  Add an object to the index.

  Parameters:
    `key` - null key positions are counted as wild-cards.
    `obj` -
  Returns:

### join

    public <U> java.util.Collection<Pair<T,U>> join(Index<S,U> index,
                                                    int shared)

  Return a join of this index to the given index, joining on the first `shared` variables.

### match

    public java.util.Collection<T> match(java.util.List<S> key)

  Return all matches to the key. There may be no null values in the key. The returned objects will be stored under keys whose elements are either equal to the corresponding element of the given key or are null.

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004 Evren Sirin. All Rights Reserved.