Class SemanticsPredicates

java.lang.Object
org.openhab.core.semantics.SemanticsPredicates

@NonNullByDefault public class SemanticsPredicates extends Object
This class provides predicates that allow filtering item streams with regards to their semantics.
Author:
Kai Kreuzer - Initial contribution
  • Constructor Details

    • SemanticsPredicates

      public SemanticsPredicates()
  • Method Details

    • isLocation

      public static Predicate<Item> isLocation()
      Creates a Predicate which can be used to filter Items that represent a Location.
      Returns:
      created Predicate
    • isEquipment

      public static Predicate<Item> isEquipment()
      Creates a Predicate which can be used to filter Items that represent an Equipment.
      Returns:
      created Predicate
    • isPoint

      public static Predicate<Item> isPoint()
      Creates a Predicate which can be used to filter Items that represent a Point.
      Returns:
      created Predicate
    • isA

      public static Predicate<Item> isA(Class<? extends Tag> type)
      Creates a Predicate which can be used to filter Items that represent a given semantic type.
      Parameters:
      type - the semantic type to filter for
      Returns:
      created Predicate
    • relatesTo

      public static Predicate<Item> relatesTo(Class<? extends Property> property)
      Creates a Predicate which can be used to filter Items that relates to a given property.
      Parameters:
      property - the semantic property to filter for
      Returns:
      created Predicate