P
- (P)eer. See Equivalents.prefixes(Object, Named, EquivalentWalker)
for more details.N
- (N)amed unit. See Equivalents.prefixes(Object, Named, EquivalentWalker)
for more details.public static interface Equivalents.EquivalentWalker<P,N extends Named>
Modifier and Type | Method and Description |
---|---|
N |
locate(P peer,
N unprefixed)
Returns the named unit that is prefixed-equivalent within/of the given peer, or null if the given peer is not
prefixed-equivalent.
|
P |
next(P peer)
Gets the next unit, or null if none.
|
P |
previous(P peer)
Gets the previous unit, or null if none.
|
boolean |
walkAll()
Specifies whether we should walk all peers, or stop when a peer does not match.
|
N locate(P peer, N unprefixed)
peer
- Locate the prefixed unit within/of this peer.unprefixed
- The original unprefixed unit.P previous(P peer)
peer
- Find the unit previous to this one.P next(P peer)
peer
- Find the unit after this one.boolean walkAll()
In other words, return true to evaluate all peers, even when null is returned from locate(Object, Named)
, and
return false to stop walking (in that direction) once locate(Object, Named)
returns null.
Copyright (c) 2019, Salesforce.com, Inc. All rights reserved. Licensed under the BSD 3-Clause license. For full license text, see the LICENSE file in the repository.