public class Entity extends GenericModel
| Constructor and Description | 
|---|
Entity(String entity,
      String value,
      Integer[] location)
Instantiates a new entity. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
String | 
getEntity()
Returns the name of the entity. 
 | 
Integer[] | 
getLocation()
Returns the location of the entity within the input string, the array will have two values: a start index and end
 index. 
 | 
String | 
getValue()
Returns the detected value of the entity. 
 | 
void | 
setEntity(String entity)
Sets the entity detected by the system for the given input. 
 | 
void | 
setLocation(Integer... location)
Sets the location of the entity detected by the system (i.e. 
 | 
void | 
setValue(String value)
Sets the value of the entity as detected by the system. 
 | 
equals, hashCode, toStringpublic String getEntity()
getValue() of the input would be
 "pepperoni".public Integer[] getLocation()
public String getValue()
public void setEntity(String entity)
entity - the new entitypublic void setLocation(Integer... location)
location - an array of Integers representing a start and end indexpublic void setValue(String value)
value - the new valueCopyright © 2015–2016 IBM Watson. All rights reserved.