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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final class
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> BiPredicate
<T, T> Returns a BiPredicate that compares its parameters via Objects.equals().static int
verifyPositive
(int value, String paramName) Validate that the given value is positive or report an IllegalArgumentException with the parameter name.static long
verifyPositive
(long value, String paramName) Validate that the given value is positive or report an IllegalArgumentException with the parameter name.
-
Field Details
-
EQUALS
-
-
Constructor Details
-
ObjectHelper
private ObjectHelper()Utility class.
-
-
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
-