Class ObjectHelper
java.lang.Object
io.reactivex.rxjava3.internal.functions.ObjectHelper
Utility methods containing the backport of Java 7's Objects utility class.
Named as such to avoid clash with java.util.Objects.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> BiPredicate<T, T> Returns a BiPredicate that compares its parameters via Objects.equals().static intverifyPositive(int value, String paramName) Validate that the given value is positive or report an IllegalArgumentException with the parameter name.static longverifyPositive(long value, String paramName) Validate that the given value is positive or report an IllegalArgumentException with the parameter name.
-
Method Details
-
equalsPredicate
Returns a BiPredicate that compares its parameters via Objects.equals().- Type Parameters:
T- the value type- Returns:
- the bi-predicate instance
-
verifyPositive
Validate that the given value is positive or report an IllegalArgumentException with the parameter name.- Parameters:
value- the value to validateparamName- the parameter name of the value- Returns:
- value
- Throws:
IllegalArgumentException- if bufferSize <= 0
-
verifyPositive
Validate that the given value is positive or report an IllegalArgumentException with the parameter name.- Parameters:
value- the value to validateparamName- the parameter name of the value- Returns:
- value
- Throws:
IllegalArgumentException- if bufferSize <= 0
-