com.hazelcast.query

## Class TruePredicate<K,V>

- java.lang.Object
- - com.hazelcast.query.TruePredicate<K,V>

- Type Parameters:
    `K` - map key type
    `V` - map value type
  All Implemented Interfaces:
    DataSerializable, IdentifiedDataSerializable, Predicate<K,V>, Serializable

      public class TruePredicate<K,V>
      extends Object
      implements IdentifiedDataSerializable, Predicate<K,V>

  A `Predicate` which always returns true.
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static TruePredicate` | `INSTANCE` An instance of the TruePredicate.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TruePredicate()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `apply(Map.Entry mapEntry)` Applies this predicate to the given map entry.
    `int` | `getFactoryId()` Returns DataSerializableFactory factory ID for this class.
    `int` | `getId()` Returns type identifier for this class.
    `void` | `readData(ObjectDataInput in)` Reads fields from the input stream
    `String` | `toString()`
    `static <K,V> TruePredicate<K,V>` | `truePredicate()`
    `void` | `writeData(ObjectDataOutput out)` Writes object fields to output stream

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### INSTANCE

          public static final TruePredicate INSTANCE

      An instance of the TruePredicate.

  - ### Constructor Detail

    - #### TruePredicate

          public TruePredicate()

  - ### Method Detail

    - #### truePredicate

          public static <K,V> TruePredicate<K,V> truePredicate()

    - #### writeData

          public void writeData(ObjectDataOutput out)
                         throws IOException

      Description copied from interface: `DataSerializable`
      Writes object fields to output stream
      Specified by:
        `writeData` in interface `DataSerializable`
      Parameters:
        `out` - output
      Throws:
        `IOException` - if an I/O error occurs. In particular, an `IOException` may be thrown if the output stream has been closed.

    - #### readData

          public void readData(ObjectDataInput in)
                        throws IOException

      Description copied from interface: `DataSerializable`
      Reads fields from the input stream
      Specified by:
        `readData` in interface `DataSerializable`
      Parameters:
        `in` - input
      Throws:
        `IOException` - if an I/O error occurs. In particular, an `IOException` may be thrown if the input stream has been closed.

    - #### apply

          public boolean apply(Map.Entry mapEntry)

      Description copied from interface: `Predicate`
      Applies this predicate to the given map entry.

      Implementations must be thread-safe, since this method may be called by multiple threads concurrently.

      Specified by:
        `apply` in interface `Predicate<K,V>`
      Parameters:
        `mapEntry` - the map entry to apply this predicate to.
      Returns:
        `true` if the given map entry matches this predicate, `false` otherwise.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### getFactoryId

          public int getFactoryId()

      Description copied from interface: `IdentifiedDataSerializable`
      Returns DataSerializableFactory factory ID for this class.
      Specified by:
        `getFactoryId` in interface `IdentifiedDataSerializable`
      Returns:
        factory ID

    - #### getId

          public int getId()

      Description copied from interface: `IdentifiedDataSerializable`
      Returns type identifier for this class. It should be unique per DataSerializableFactory.
      Specified by:
        `getId` in interface `IdentifiedDataSerializable`
      Returns:
        type ID

Copyright © 2018. All rights reserved.