Class BaseNlpEntity

java.lang.Object
com.restfb.types.webhook.messaging.nlp.BaseNlpEntity
Direct Known Subclasses:
NlpAmountOfMoney, NlpBye, NlpCustomWitAi, NlpDatetime, NlpDistance, NlpDuration, NlpEmail, NlpGreetings, NlpLocation, NlpPhoneNumber, NlpQuantity, NlpReminder, NlpSentiment, NlpTemperature, NlpUrl, NlpVolume

public abstract class BaseNlpEntity extends Object
  • Constructor Details

  • Method Details

    • isEntityOnly

      public boolean isEntityOnly()
      returns if the object contains only a nlp entity or if the nlp object contains body, start and end fields, too.
      Returns:
      true if the nlp object contains also body, start and end fields, false otherwise
    • as

      public <T extends BaseNlpEntity> T as(Class<T> clazz)
    • getConfidence

    • setConfidence

      public void setConfidence(Double confidence)
    • getValue

      public String getValue()
    • setValue

      public void setValue(String value)
    • getEntity

      public String getEntity()
    • setEntity

      public void setEntity(String entity)
    • getBody

      public String getBody()
      body of this entity.
    • setBody

      public void setBody(String body)
      body of this entity.
    • getStart

      public Integer getStart()
      start position of the entity in the message
    • setStart

      public void setStart(Integer start)
      start position of the entity in the message
    • getEnd

      public Integer getEnd()
      end position of the entity in the message
    • setEnd

      public void setEnd(Integer end)
      end position of the entity in the message