org.basex.data
Class FTMatch

java.lang.Object
  extended by org.basex.util.list.ElementList
      extended by org.basex.data.FTMatch
All Implemented Interfaces:
java.lang.Iterable<FTStringMatch>

public final class FTMatch
extends ElementList
implements java.lang.Iterable<FTStringMatch>

Match full-text container, referencing several FTStringMatch instances.

Author:
BaseX Team 2005-12, BSD License, Christian Gruen

Field Summary
 
Fields inherited from class org.basex.util.list.ElementList
factor, size
 
Constructor Summary
FTMatch()
          Constructor.
FTMatch(int capacity)
          Constructor, specifying an initial internal array size.
 
Method Summary
 FTMatch add(FTMatch mtc)
          Adds a all matches of a full-text match.
 FTMatch add(FTStringMatch m)
          Adds a string match.
protected  FTMatch copy()
          Creates a deep copy of this container.
 java.util.Iterator<FTStringMatch> iterator()
           
 boolean notin(FTMatch mtc)
          Checks if the full-text match is not part of the specified match.
 void sort()
          Sorts the matches.
 java.lang.String toString()
           
 
Methods inherited from class org.basex.util.list.ElementList
isEmpty, newSize, newSize, reset, size, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FTMatch

public FTMatch()
Constructor.


FTMatch

public FTMatch(int capacity)
Constructor, specifying an initial internal array size.

Parameters:
capacity - initial array capacity
Method Detail

add

public FTMatch add(FTMatch mtc)
Adds a all matches of a full-text match.

Parameters:
mtc - match to be added
Returns:
self reference

add

public FTMatch add(FTStringMatch m)
Adds a string match.

Parameters:
m - match to be added
Returns:
self reference

notin

public boolean notin(FTMatch mtc)
Checks if the full-text match is not part of the specified match.

Parameters:
mtc - match to be checked
Returns:
result of check

sort

public void sort()
Sorts the matches.


copy

protected FTMatch copy()
Creates a deep copy of this container.

Returns:
copy

iterator

public java.util.Iterator<FTStringMatch> iterator()
Specified by:
iterator in interface java.lang.Iterable<FTStringMatch>

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object