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 Summary
Constructors Constructor Description BaseNlpEntity()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends BaseNlpEntity>
Tas(Class<T> clazz)
String
getBody()
body of this entity.Double
getConfidence()
Integer
getEnd()
end position of the entity in the messageString
getEntity()
Integer
getStart()
start position of the entity in the messageString
getValue()
boolean
isEntityOnly()
returns if the object contains only a nlp entity or if the nlp object contains body, start and end fields, too.void
setBody(String body)
body of this entity.void
setConfidence(Double confidence)
void
setEnd(Integer end)
end position of the entity in the messagevoid
setEntity(String entity)
void
setStart(Integer start)
start position of the entity in the messagevoid
setValue(String value)
-
-
-
Constructor Detail
-
BaseNlpEntity
public BaseNlpEntity()
-
-
Method Detail
-
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
public Double getConfidence()
-
setConfidence
public void setConfidence(Double confidence)
-
-