public class RuleResultMetadata extends Object
Modifier and Type | Class and Description |
---|---|
static class |
RuleResultMetadata.CountCategory
Count category.
|
Modifier and Type | Field and Description |
---|---|
protected Map<RuleResultMetadata.CountCategory,Integer> |
counts
Character count metadata.
|
Constructor and Description |
---|
RuleResultMetadata()
Creates a new rule result metadata.
|
RuleResultMetadata(RuleResultMetadata.CountCategory category,
int value)
Creates a new rule result metadata.
|
Modifier and Type | Method and Description |
---|---|
int |
getCount(RuleResultMetadata.CountCategory category)
Returns the count for the supplied category.
|
Map<RuleResultMetadata.CountCategory,Integer> |
getCounts()
Returns an unmodifiable map of all count metadata.
|
boolean |
hasCount(RuleResultMetadata.CountCategory category)
Returns whether a count exists for the supplied category.
|
void |
merge(RuleResultMetadata metadata)
Merges the supplied metadata with this metadata.
|
void |
putCount(RuleResultMetadata.CountCategory category,
int value)
Adds a count to the metadata.
|
String |
toString() |
protected final Map<RuleResultMetadata.CountCategory,Integer> counts
public RuleResultMetadata()
public RuleResultMetadata(RuleResultMetadata.CountCategory category, int value)
category
- count category.value
- count value.public boolean hasCount(RuleResultMetadata.CountCategory category)
category
- of the count.public int getCount(RuleResultMetadata.CountCategory category)
category
- of the count.public Map<RuleResultMetadata.CountCategory,Integer> getCounts()
public void putCount(RuleResultMetadata.CountCategory category, int value)
category
- of the count.value
- non-negative character count.public void merge(RuleResultMetadata metadata)
metadata
- to merge.Copyright © 2003-2024 Virginia Tech. All Rights Reserved.