Top Description Fields Constructors Methods
org.assertj.core.condition

public Class AnyOf<T>

extends Join<T>
Class Inheritance
Type Parameters
<T>
the type of object this condition accepts.
Imports
org.assertj.core.api.Condition

Returns true if any of the joined conditions is satisfied.
Authors
Yvonne Wang, Mikhail Mazursky

Field Summary

Inherited from org.assertj.core.condition.Join:
conditionsPREFIX_DELIMITERSUFFIX_DELIMITER

Constructor Summary

AccessConstructor and Description
private
AnyOf(Condition<? super T>... conditions)

private
AnyOf(Iterable<? extends Condition<? super T>> conditions)

Method Summary

Modifier and TypeMethod and Description
public static <
the type of object the given condition accept.
T
>
Condition<T>

Returns:

the created AnyOf.
anyOf
(Condition<? super T>...
the conditions to evaluate.
conditions
)

Creates a new AnyOf

public static <
the type of object the given condition accept.
T
>
Condition<T>

Returns:

the created AnyOf.
anyOf
(Iterable<? extends Condition<? super T>>
the conditions to evaluate.
conditions
)

Creates a new AnyOf

public String
descriptionPrefix()

Implements abstract org.assertj.core.condition.Join.descriptionPrefix.

method used to prefix the subclass join description, ex: "all of"
public boolean
matches(T
the value to verify.
value
)

Overrides org.assertj.core.api.Condition.matches.

Verifies that the given value satisfies this condition.
Inherited from org.assertj.core.condition.Join:
conditionDescriptionWithStatusconditionsdescription

Constructor Detail

AnyOfback to summary
private AnyOf(Condition<? super T>... conditions)
Annotations
@SafeVarargs
AnyOfback to summary
private AnyOf(Iterable<? extends Condition<? super T>> conditions)

Method Detail

anyOfback to summary
public static <T> Condition<T> anyOf(Condition<? super T>... conditions)

Creates a new AnyOf

Parameters
<T>
the type of object the given condition accept.
conditions:Condition<? super T>[]

the conditions to evaluate.

Returns:Condition<T>

the created AnyOf.

Annotations
@SafeVarargs
Exceptions
NullPointerException:
  • if the given array is null.
  • if any of the elements in the given array is null.
anyOfback to summary
public static <T> Condition<T> anyOf(Iterable<? extends Condition<? super T>> conditions)

Creates a new AnyOf

Parameters
<T>
the type of object the given condition accept.
conditions:Iterable<? extends Condition<? super T>>

the conditions to evaluate.

Returns:Condition<T>

the created AnyOf.

Exceptions
NullPointerException:
  • if the given iterable is null.
  • if any of the elements in the given iterable is null.
descriptionPrefixback to summary
public String descriptionPrefix()

Implements abstract org.assertj.core.condition.Join.descriptionPrefix.

Doc from org.assertj.core.condition.Join.descriptionPrefix.

method used to prefix the subclass join description, ex: "all of"

Returns:String

the prefix to use to build the description.

Annotations
@Override
matchesback to summary
public boolean matches(T value)

Overrides org.assertj.core.api.Condition.matches.

Doc from org.assertj.core.api.Condition.matches.

Verifies that the given value satisfies this condition.

Parameters
value:T

the value to verify.

Returns:boolean

true if the given value satisfies this condition; false otherwise.

Annotations
@Override