java.lang.Object
net.i2p.i2ptunnel.access.DefinitionParser.DefinitionBuilder
Enclosing class:
DefinitionParser

private static class DefinitionParser.DefinitionBuilderextends Object
Accumulates the parts of one definition.
  • Field Details

    • threshold

      private Threshold threshold
      The default threshold of the definition.
    • elements

      private List<FilterDefinitionElement> elements
      The filter elements of the definition.
    • recorders

      private List<Recorder> recorders
      The recorders of the definition.
  • Constructor Details

    • DefinitionBuilder

      private DefinitionBuilder()
      Accumulates one access definition while parsing.
  • Method Details

    • setDefaultThreshold

      void setDefaultThreshold(Threshold threshold) throws InvalidDefinitionException
      Sets the default threshold, once only.
      Parameters:
      threshold - the threshold to set
      Throws:
      InvalidDefinitionException - if a threshold was already set
    • addElement

      void addElement(FilterDefinitionElement element)
      Adds one filter element.
      Parameters:
      element - the element to add
    • addRecorder

      void addRecorder(Recorder recorder)
      Adds one recorder.
      Parameters:
      recorder - the recorder to add
    • build

      Builds the definition from the parts added.
      Returns:
      the definition built