public static class

JsonPredicate.Builder

extends Object
java.lang.Object
   ↳ com.urbanairship.json.JsonPredicate.Builder

Class Overview

Builder class.

Summary

Public Constructors
Builder()
Public Methods
JsonPredicate.Builder addMatcher(JsonMatcher matcher)
Adds a JsonMatcher.
JsonPredicate.Builder addPredicate(JsonPredicate predicate)
Adds a JsonPredicate.
JsonPredicate build()
Builds the JsonPredicate instance.
JsonPredicate.Builder setPredicateType(String type)
Sets the predicate type.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public Builder ()

Public Methods

public JsonPredicate.Builder addMatcher (JsonMatcher matcher)

Adds a JsonMatcher.

Parameters
matcher The JsonMatcher instance.
Returns
  • The builder instance.

public JsonPredicate.Builder addPredicate (JsonPredicate predicate)

Adds a JsonPredicate.

Parameters
predicate The JsonPredicate instance.
Returns
  • The builder instance.

public JsonPredicate build ()

Builds the JsonPredicate instance.

Returns
  • The JsonPredicate instance.
Throws
IllegalArgumentException if a NOT predicate has more than one matcher or predicate defined, or if the predicate does not contain at least 1 child predicate or matcher.

public JsonPredicate.Builder setPredicateType (String type)

Sets the predicate type. If type NOT, only one matcher or predicate is allowed to be added.

Parameters
type The predicate type.
Returns
  • The builder instance.