public interface Evidence extends Iterable<EvidenceItem>
Modifier and Type | Method and Description |
---|---|
boolean |
containsKey(String key)
Returns true if the evidence contains an item with the specified key.
|
boolean |
containsOrigin(String origin)
Returns true if the evidence contains an evidence item of the specified origin (e.g.
|
EvidenceItem |
get(String key)
Returns the evidence item identified by the specified key (e.g.
|
Iterator<EvidenceItem> |
iterator()
Provides an iterator which returns all the EvidenceItems in the Evidence.
|
forEach, spliterator
EvidenceItem get(String key)
key
- the key of the evidence item e.g. "user-agent"boolean containsKey(String key)
key
- the key of the evidence item e.g. "user-agent"boolean containsOrigin(String origin)
origin
- the origin (e.g. "http", "context", "adf" etc)Iterator<EvidenceItem> iterator()
This iterator method (in conjunction with the Iterable interface) enables evidence items to be processed using a java for loop. for example:
for (EvidenceItem evidenceItem : evidence) { String key = evidenceItem.getKey(); Object value = evidenceItem.getValue(); }
iterator
in interface Iterable<EvidenceItem>
Copyright (c) 2014-2021 All Rights Reserved by the RWS Group for and on behalf of its affiliates and subsidiaries