Package jodd.json
Class PathQuery
- java.lang.Object
-
- jodd.json.PathQuery
-
public class PathQuery extends java.lang.ObjectPath query is used to match properties with some Path. Query is expressed in dot notation. Each term between the dots is a property name of a parent. Query may contains wildcard: '*' that can be used instead of a named term.Included and excluded path matching works a bit differently. Included query matches all sub-paths. Excluded query is strict and match only paths with the same length.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String[]expressionprotected booleanincludedprotected booleanwildcard
-
Constructor Summary
Constructors Constructor Description PathQuery(java.lang.String expression, boolean included)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)inthashCode()booleanisIncluded()Returnstrueif this query indicates that matching properties should be included.booleanisWildcard()Returnstrueif this query contains a wildcard.booleanmatches(Path path)Returnstrueif path matches the query.java.lang.StringtoString()
-
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
matches
public boolean matches(Path path)
Returnstrueif path matches the query.
-
isWildcard
public boolean isWildcard()
Returnstrueif this query contains a wildcard.
-
isIncluded
public boolean isIncluded()
Returnstrueif this query indicates that matching properties should be included.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-