Enum Class Contains
- All Implemented Interfaces:
Serializable,Comparable<Contains>,Constable,BiPredicate<Object,,Collection> PBiPredicate<Object,Collection>
Contains is a BiPredicate that evaluates whether the first object is contained within (or not
within) the second collection object. If the first object is a number, each element in the second collection
will be compared to the first object using Compare's eq predicate. This will ensure, that numbers
are matched by their value only, ignoring the number type. For example:
gremlin Contains.within [gremlin, blueprints, furnace] == true gremlin Contains.without [gremlin, rexster] == false rexster Contains.without [gremlin, blueprints, furnace] == true 123 Contains.within [1, 2, 3] == false 100 Contains.within [1L, 10L, 100L] == true
- Author:
- Pierre De Wilde, Marko A. Rodriguez (http://markorodriguez.com)
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfMethods inherited from interface java.util.function.BiPredicate
and, negate, orMethods inherited from interface org.apache.tinkerpop.gremlin.process.traversal.PBiPredicate
getPredicateName
-
Enum Constant Details
-
within
The first object is within theCollectionprovided in the second object. The second object may not benull.- Since:
- 3.0.0-incubating
-
without
The first object is not within theCollectionprovided in the second object. The second object may not benull.- Since:
- 3.0.0-incubating
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
test
- Specified by:
testin interfaceBiPredicate<Object,Collection>
-