org.modeshape.sequencer.ddl

## Class DdlParserScorer

- java.lang.Object
- - org.modeshape.sequencer.ddl.DdlParserScorer

-     @NotThreadSafe
      public class DdlParserScorer
      extends Object

  Interface used by a parser to determine a score describing how well it handles the DDL content.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DdlParserScorer()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getScore()` Get the score.
    `void` | `reset()` Reset the score back to zero.
    `void` | `scoreStatements(int count)` Increment the score because another statement was matched.
    `void` | `scoreText(String text, int factor, String... keywords)` Increment the score if the given text contains any of the supply keywords.
    `void` | `scoreText(String text, String... keywords)` Increment the score if the given text contains any of the supply keywords.
    `String` | `toString()`

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

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

- - ### Constructor Detail

    - #### DdlParserScorer

          public DdlParserScorer()

  - ### Method Detail

    - #### reset

          public void reset()

      Reset the score back to zero.

    - #### scoreStatements

          public void scoreStatements(int count)

      Increment the score because another statement was matched.
      Parameters:
        `count` - the number of statements

    - #### scoreText

          public void scoreText(String text,
                       int factor,
                       String... keywords)

      Increment the score if the given text contains any of the supply keywords.
      Parameters:
        `text` - the text to evaluate; may be null
        `factor` - the factor to use for each increment
        `keywords` - the keywords to be found in the text

    - #### scoreText

          public void scoreText(String text,
                       String... keywords)

      Increment the score if the given text contains any of the supply keywords.
      Parameters:
        `text` - the text to evaluate; may be null
        `keywords` - the keywords to be found in the text

    - #### getScore

          public int getScore()

      Get the score.
      Returns:
        the score

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`
      See Also:
        `Object.toString()`

Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.