Class SearchCompiler.Nth
- java.lang.Object
-
- org.openstreetmap.josm.data.osm.search.SearchCompiler.Match
-
- org.openstreetmap.josm.data.osm.search.SearchCompiler.Nth
-
- All Implemented Interfaces:
java.util.function.Predicate<OsmPrimitive>
- Enclosing class:
- SearchCompiler
private static class SearchCompiler.Nth extends SearchCompiler.Match
Matches the n-th object of a relation and/or the n-th node of a way.
-
-
Constructor Summary
Constructors Modifier Constructor Description private
Nth(int nth, boolean modulo)
(package private)
Nth(PushbackTokenizer tokenizer, boolean modulo)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
int
hashCode()
boolean
match(OsmPrimitive osm)
Tests whether the primitive matches this criterion.java.lang.String
toString()
-
Methods inherited from class org.openstreetmap.josm.data.osm.search.SearchCompiler.Match
match, test, validate
-
-
-
-
Constructor Detail
-
Nth
Nth(PushbackTokenizer tokenizer, boolean modulo) throws SearchParseError
- Throws:
SearchParseError
-
Nth
private Nth(int nth, boolean modulo) throws SearchParseError
- Throws:
SearchParseError
-
-
Method Detail
-
match
public boolean match(OsmPrimitive osm)
Description copied from class:SearchCompiler.Match
Tests whether the primitive matches this criterion.- Specified by:
match
in classSearchCompiler.Match
- Parameters:
osm
- the primitive to test- Returns:
- true if the primitive matches this criterion
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
-