Package org.apache.accumulo.iteratortest
Class IteratorTestOutput
- java.lang.Object
-
- org.apache.accumulo.iteratortest.IteratorTestOutput
-
public class IteratorTestOutput extends Object
The expected results from invoking aIteratorTestCase
on aIteratorTestInput
. The output will be either aSortedMap
of Keys and Values or an exception but never both. If one of these members is null, the other is guaranteed to be non-null.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
IteratorTestOutput.TestOutcome
An outcome about what happened during a test case.
-
Constructor Summary
Constructors Constructor Description IteratorTestOutput(Exception e)
IteratorTestOutput(SortedMap<Key,Value> output)
Create an instance of the class.IteratorTestOutput(IteratorTestOutput.TestOutcome outcome)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
Exception
getException()
Returns the exception thrown by the iterator.SortedMap<Key,Value>
getOutput()
Returns the output from the iterator.IteratorTestOutput.TestOutcome
getTestOutcome()
boolean
hasException()
int
hashCode()
boolean
hasOutput()
String
toString()
-
-
-
Constructor Detail
-
IteratorTestOutput
public IteratorTestOutput(IteratorTestOutput.TestOutcome outcome)
-
IteratorTestOutput
public IteratorTestOutput(SortedMap<Key,Value> output)
Create an instance of the class.- Parameters:
output
- The sorted collection of Key-Value pairs generated by an Iterator.
-
IteratorTestOutput
public IteratorTestOutput(Exception e)
-
-
Method Detail
-
getTestOutcome
public IteratorTestOutput.TestOutcome getTestOutcome()
- Returns:
- The outcome of the test.
-
getOutput
public SortedMap<Key,Value> getOutput()
Returns the output from the iterator.- Returns:
- The sorted Key-Value pairs from an iterator, null if an exception was thrown.
-
hasOutput
public boolean hasOutput()
- Returns:
- True if there is output, false if the output is null.
-
getException
public Exception getException()
Returns the exception thrown by the iterator.- Returns:
- The exception thrown by the iterator, null if no exception was thrown.
-
hasException
public boolean hasException()
- Returns:
- True if there is an exception, null if the iterator successfully generated Key-Value pairs.
-
-