Predicate (cloudsim 3.1-SNAPSHOT API)

org.cloudbus.cloudsim.core.predicates

## Class Predicate

- java.lang.Object
- - org.cloudbus.cloudsim.core.predicates.Predicate

- Direct Known Subclasses:
    PredicateAny, PredicateFrom, PredicateNone, PredicateNotFrom, PredicateNotType, PredicateType

      public abstract class Predicate
      extends Object

  Predicates are used to select events from the deferred queue. This class is abstract and must be extended when writing a new predicate. Some standard predicates are provided.
  The idea of simulation predicates was copied from SimJava 2.
  Since:
    CloudSim Toolkit 1.0
  Author:
    Marcos Dias de Assuncao
  See Also:
    `PredicateType`, `PredicateFrom`, `PredicateAny`, `PredicateNone`, `Simulation`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Predicate()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract boolean` | `match(SimEvent event)` The match function which must be overridden when writing a new predicate.

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

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

- - ### Constructor Detail

    - #### Predicate

          public Predicate()

  - ### Method Detail

    - #### match

          public abstract boolean match(SimEvent event)

      The match function which must be overridden when writing a new predicate. The function is called with each event in the deferred queue as its parameter when a `Simulation.select()` call is made by the user.
      Parameters:
        `event` - The event to test for a match.
      Returns:
        The function should return `true` if the event matches and should be selected, or `false` if it does not match the predicate.

Copyright © 2013 The Cloud Computing and Distributed Systems (CLOUDS) Laboratory, The University of Melbourne. All Rights Reserved.