public class StatusCounter extends Object
| Constructor and Description |
|---|
StatusCounter() |
| Modifier and Type | Method and Description |
|---|---|
Status |
getFinalStatus()
If statuses for all items are the same then this finalStatus is returned, otherwise
Status.FAILED. |
int |
getValueFor(Status status)
Gets the counter for given finalStatus.
|
void |
incrementFor(Status status)
Increments finalStatus counter by 1.
|
int |
size()
Returns sum of all occurrences for all statuses.
|
public void incrementFor(Status status)
status - finalStatus for which the counter should be incremented.public int getValueFor(Status status)
public int size()
public Status getFinalStatus()
Status.FAILED.Copyright © 2016. All rights reserved.