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.basex.data
Class FTMatches

    java.lang.Object
      org.basex.data.FTMatches

All Implemented Interfaces:
  java.lang.Iterable<FTMatch>

    public final class FTMatches

extends java.lang.Object
implements java.lang.Iterable<FTMatch>

AllMatches full-text container, referencing several `FTMatch` instances.

Author:
  Workgroup DBIS, University of Konstanz 2005-09, ISC License, Christian Gruen

Field Summary
`FTMatch[]` | `match` Full-text matches.
`int` | `size` Number of entries.
`byte` | `sTokenNum` Current number of tokens.

Constructor Summary
`FTMatches(byte s)` Constructor.

Method Summary
`void` | `add(FTMatch m)` Adds a match entry.
`void` | `and(int s, int e)` Adds a match entry.
`void` | `delete(int i)` Removes the specified match.
`java.util.Iterator<FTMatch>` | `iterator()`
`boolean` | `matches()` Checks if at least one of the matches contains only includes.
`void` | `or(int s)` Adds a match entry.
`void` | `or(int s, int e)` Adds a match entry.
`boolean` | `phrase(FTMatches all)` Combines two matches as phrase.
`void` | `reset(byte s)` Resets the match counter.
`java.lang.String` | `toString()`

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

Field Detail

### match

    public FTMatch[] match

  Full-text matches.

### size

    public int size

  Number of entries.

### sTokenNum

    public byte sTokenNum

  Current number of tokens.

Constructor Detail

### FTMatches

    public FTMatches(byte s)

  Constructor.

  Parameters:
    `s` - sets the token number

Method Detail

### reset

    public void reset(byte s)

  Resets the match counter.

  Parameters:
    `s` - sets the token number

### or

    public void or(int s)

  Adds a match entry.

  Parameters:
    `s` - position

### or

    public void or(int s,
                   int e)

  Adds a match entry.

  Parameters:
    `s` - start position
    `e` - end position

### and

    public void and(int s,
                    int e)

  Adds a match entry.

  Parameters:
    `s` - start position
    `e` - end position

### add

    public void add(FTMatch m)

  Adds a match entry.

  Parameters:
    `m` - match to be added

### delete

    public void delete(int i)

  Removes the specified match.

  Parameters:
    `i` - match offset

### matches

    public boolean matches()

  Checks if at least one of the matches contains only includes.

  Returns:
    result of check

### phrase

    public boolean phrase(FTMatches all)

  Combines two matches as phrase.

  Parameters:
    `all` - second match list
  Returns:
    true if matches are left

### iterator

    public java.util.Iterator<FTMatch> iterator()

  Specified by:
    `iterator` in interface `java.lang.Iterable<FTMatch>`

### 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