public class BipolarSentiment extends Object implements Sentiment
Modifier and Type | Class and Description |
---|---|
static class |
BipolarSentiment.State
The states of a bipolar sentiment
|
Modifier and Type | Field and Description |
---|---|
static BipolarSentiment |
NEGATIVE
a negative sentiment instance
|
static BipolarSentiment |
NEUTRAL
a neutral sentiment instance
|
static BipolarSentiment |
POSITIVE
a positive sentiment instance
|
Constructor and Description |
---|
BipolarSentiment()
Initialize sentiment as
BipolarSentiment.State.NEUTRAL |
BipolarSentiment(BipolarSentiment.State positive)
Instantiate the sentiment
|
Modifier and Type | Method and Description |
---|---|
Map<String,?> |
asMap() |
boolean |
equals(Object obj) |
void |
fromMap(Map<String,?> map) |
static Set<BipolarSentiment> |
listBipolarSentiment() |
boolean |
negative() |
boolean |
neutral() |
boolean |
positive() |
BipolarSentiment.State |
sentiment() |
String |
toString() |
public static final BipolarSentiment NEUTRAL
public static final BipolarSentiment NEGATIVE
public static final BipolarSentiment POSITIVE
public BipolarSentiment()
BipolarSentiment.State.NEUTRAL
public BipolarSentiment(BipolarSentiment.State positive)
positive
- public boolean negative()
public boolean positive()
public boolean neutral()
public BipolarSentiment.State sentiment()
public void fromMap(Map<String,?> map) throws UnrecognisedMapException
fromMap
in interface Sentiment
map
- the map containing this sentimentUnrecognisedMapException
public static Set<BipolarSentiment> listBipolarSentiment()
BipolarSentiment
instances