Class Concept.Builder

Enclosing class:
Concept

public static class Concept.Builder extends BaseAttribute.Builder<Concept,Concept.Builder>
A Builder for concepts
  • Field Details

    • phrase

      protected String phrase
    • salience

      protected Double salience
    • conceptId

      protected String conceptId
  • Constructor Details

    • Builder

      public Builder(String phrase, String conceptId)
      Construct a builder out of the required properties
      Parameters:
      phrase - the name of the concept
      conceptId - the ID associated with the concept
    • Builder

      public Builder(Concept toCopy)
      Constructs a builder by copying values from an existing concept
      Parameters:
      toCopy - the object to copy from
  • Method Details

    • phrase

      public Concept.Builder phrase(String phrase)
      Specify the name of the concept
      Parameters:
      phrase - the name of the concept
      Returns:
      this
    • salience

      public Concept.Builder salience(Double salience)
      Specify the salience associated with this concept
      Parameters:
      salience - the salience associated with the concept
      Returns:
      this
    • conceptId

      public Concept.Builder conceptId(String conceptId)
      Specify the unique ID associated with this concept
      Parameters:
      conceptId - the unique ID associated with the concept
      Returns:
      this
    • build

      public Concept build()
      Returns an immutable concept based on the content of the builder
      Returns:
      the new concept
    • getThis

      protected Concept.Builder getThis()
      Specified by:
      getThis in class BaseAttribute.Builder<Concept,Concept.Builder>