org.apache.tinkerpop.gremlin.process.traversal

## Enum Contains

- java.lang.Object
- - java.lang.Enum<Contains>
  - - org.apache.tinkerpop.gremlin.process.traversal.Contains

- All Implemented Interfaces:
    Serializable, Comparable<Contains>, BiPredicate<Object,Collection>

      public enum Contains
      extends Enum<Contains>
      implements BiPredicate<Object,Collection>

  `Contains` is a `BiPredicate` that evaluates whether the first object is contained within (or not within) the second collection object. For example:

       gremlin Contains.within [gremlin, blueprints, furnace] == true
       gremlin Contains.without [gremlin, rexster] == false
       rexster Contains.without [gremlin, blueprints, furnace] == true

  Author:
    Pierre De Wilde, Marko A. Rodriguez (http://markorodriguez.com)

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `within` The first object is within the `Collection` provided in the second object.
    `without` The first object is not within the `Collection` provided in the second object.

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Contains` | `negate()` Produce the opposite representation of the current `Contains` enum.
    `abstract boolean` | `test(Object first, Collection second)`
    `static Contains` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static Contains[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

    - ### Methods inherited from class java.lang.Enum

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface java.util.function.BiPredicate

      `and, or`

- - ### Enum Constant Detail

    - #### within

          public static final Contains within

      The first object is within the `Collection` provided in the second object.
      Since:
        3.0.0-incubating

    - #### without

          public static final Contains without

      The first object is not within the `Collection` provided in the second object.
      Since:
        3.0.0-incubating

  - ### Method Detail

    - #### values

          public static Contains[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (Contains c : Contains.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static Contains valueOf(String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
        `NullPointerException` - if the argument is null

    - #### test

          public abstract boolean test(Object first,
                                       Collection second)

      Specified by:
        `test` in interface `BiPredicate<Object,Collection>`

    - #### negate

          public Contains negate()

      Produce the opposite representation of the current `Contains` enum.
      Specified by:
        `negate` in interface `BiPredicate<Object,Collection>`

Copyright © 2013–2020 Apache Software Foundation. All rights reserved.