Row (Lucene 10.5.0 stempel API)
Description: declaration: package: org.egothor.stemmer, class: Row

Package org.egothor.stemmer

# Class Row

java.lang.Object
org.egothor.stemmer.Row

public class Row extends Object
The Row class represents a row in a matrix representation of a trie.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Row()`
  The default constructor for the Row object.
  `Row(DataInput is)`
  Construct a Row object from input carried in via the given input stream.
  `Row(Row old)`
  Construct a Row using the cells of the given Row.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getCells()`
  Return the number of cells in use.
  `int`
  `getCellsPnt()`
  Return the number of references (how many transitions) to other rows.
  `int`
  `getCellsVal()`
  Return the number of patch commands saved in this Row.
  `int`
  `getCmd(char way)`
  Return the command in the Cell associated with the given character.
  `int`
  `getCnt(char way)`
  Return the number of patch commands were in the Cell associated with the given character before the Trie containing this Row was reduced.
  `int`
  `getRef(char way)`
  Return the reference to the next Row in the Cell associated with the given character.
  `void`
  `print(PrintStream out)`
  Write the contents of this Row to the printstream.
  `void`
  `setCmd(char way, int cmd)`
  Set the command in the Cell of the given character to the given integer.
  `void`
  `setRef(char way, int ref)`
  Set the reference to the next row in the Cell of the given character to the given integer.
  `void`
  `store(DataOutput os)`
  Write the contents of this Row to the given output stream.
  `int`
  `uniformCmd(boolean eqSkip)`
  Return the number of identical Cells (containing patch commands) in this Row.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### Row

    public Row(DataInput is) throws IOException
    Construct a Row object from input carried in via the given input stream.
    Parameters:
      `is` - the input stream
    Throws:
      `IOException` - if an I/O error occurs

  - ### Row

    public Row()
    The default constructor for the Row object.

  - ### Row

    public Row(Row old)
    Construct a Row using the cells of the given Row.
    Parameters:
      `old` - the Row to copy

- ## Method Details

  - ### setCmd

    public void setCmd(char way, int cmd)
    Set the command in the Cell of the given character to the given integer.
    Parameters:
      `way` - the character defining the Cell
      `cmd` - the new command

  - ### setRef

    public void setRef(char way, int ref)
    Set the reference to the next row in the Cell of the given character to the given integer.
    Parameters:
      `way` - the character defining the Cell
      `ref` - The new ref value

  - ### getCells

    public int getCells()
    Return the number of cells in use.
    Returns:
      the number of cells in use

  - ### getCellsPnt

    public int getCellsPnt()
    Return the number of references (how many transitions) to other rows.
    Returns:
      the number of references

  - ### getCellsVal

    public int getCellsVal()
    Return the number of patch commands saved in this Row.
    Returns:
      the number of patch commands

  - ### getCmd

    public int getCmd(char way)
    Return the command in the Cell associated with the given character.
    Parameters:
      `way` - the character associated with the Cell holding the desired command
    Returns:
      the command

  - ### getCnt

    public int getCnt(char way)
    Return the number of patch commands were in the Cell associated with the given character before the Trie containing this Row was reduced.
    Parameters:
      `way` - the character associated with the desired Cell
    Returns:
      the number of patch commands before reduction

  - ### getRef

    public int getRef(char way)
    Return the reference to the next Row in the Cell associated with the given character.
    Parameters:
      `way` - the character associated with the desired Cell
    Returns:
      the reference, or -1 if the Cell is `null`

  - ### store

    public void store(DataOutput os) throws IOException
    Write the contents of this Row to the given output stream.
    Parameters:
      `os` - the output stream
    Throws:
      `IOException` - if an I/O error occurs

  - ### uniformCmd

    public int uniformCmd(boolean eqSkip)
    Return the number of identical Cells (containing patch commands) in this Row.
    Parameters:
      `eqSkip` - when set to `false` the removed patch commands are considered
    Returns:
      the number of identical Cells, or -1 if there are (at least) two different cells

  - ### print

    public void print(PrintStream out)
    Write the contents of this Row to the printstream.