Package jodd.json
Class PathQuery
- java.lang.Object
-
- jodd.json.PathQuery
-
public class PathQuery extends java.lang.Object
Path 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[]
expression
protected boolean
included
protected boolean
wildcard
-
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 boolean
equals(java.lang.Object o)
int
hashCode()
boolean
isIncluded()
Returnstrue
if this query indicates that matching properties should be included.boolean
isWildcard()
Returnstrue
if this query contains a wildcard.boolean
matches(Path path)
Returnstrue
if path matches the query.java.lang.String
toString()
-
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
matches
public boolean matches(Path path)
Returnstrue
if path matches the query.
-
isWildcard
public boolean isWildcard()
Returnstrue
if this query contains a wildcard.
-
isIncluded
public boolean isIncluded()
Returnstrue
if this query indicates that matching properties should be included.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-