@Immutable public final class InstanceContentEvent extends Object implements ContentEvent
Constructor and Description |
---|
InstanceContentEvent() |
InstanceContentEvent(long index,
Instance instance,
boolean isTraining,
boolean isTesting)
Instantiates a new instance event.
|
Modifier and Type | Method and Description |
---|---|
int |
getClassId()
Gets the class id.
|
int |
getClassifierIndex()
Gets the classifier index.
|
int |
getEvaluationIndex()
Gets the evaluation index.
|
Instance |
getInstance()
Gets the single instance of InstanceEvent.
|
long |
getInstanceIndex()
Gets the instance index.
|
String |
getKey()
Gets the content event key.
|
String |
getKey(int key) |
boolean |
isLastEvent() |
boolean |
isTesting()
Checks if is testing.
|
boolean |
isTraining()
Checks if is training.
|
void |
setClassifierIndex(int classifierIndex)
Sets the classifier index.
|
void |
setEvaluationIndex(int evaluationIndex)
Sets the evaluation index.
|
void |
setKey(String str)
Sets the content event key.
|
void |
setLast(boolean isLast) |
void |
setTesting(boolean testing)
Set testing flag.
|
void |
setTraining(boolean training)
Set training flag.
|
public InstanceContentEvent()
public InstanceContentEvent(long index, Instance instance, boolean isTraining, boolean isTesting)
index
- the indexinstance
- the instanceisTraining
- the is trainingpublic Instance getInstance()
public long getInstanceIndex()
public int getClassId()
public boolean isTraining()
public void setTraining(boolean training)
training
- flag.public boolean isTesting()
public void setTesting(boolean testing)
testing
- flag.public int getClassifierIndex()
public void setClassifierIndex(int classifierIndex)
classifierIndex
- the new classifier indexpublic int getEvaluationIndex()
public void setEvaluationIndex(int evaluationIndex)
evaluationIndex
- the new evaluation indexpublic String getKey(int key)
public String getKey()
ContentEvent
getKey
in interface ContentEvent
public void setKey(String str)
ContentEvent
setKey
in interface ContentEvent
str
- stringpublic boolean isLastEvent()
isLastEvent
in interface ContentEvent
public void setLast(boolean isLast)
Copyright © 2013–2015 The Apache Software Foundation. All rights reserved.