Skip to content

Package io.github.qishr.cascara.common.service

Class CapabilityQueries

java.lang.Object
        io.github.qishr.cascara.common.service.CapabilityQueries


public class CapabilityQueries

Constructor Summary

Constructor Description
CapabilityQueries()

Method Summary

Modifier and Type Method Description
public static Predicate<Properties> hasExactValue(String key, Object expectedValue) Matches if a property has a specific exact value (matches JSON Schema types like String, Boolean, Number)
public static Predicate<Properties> isTrue(String key) Matches if a property is a boolean flag set to true
public static Predicate<Properties> allOf(Predicate<Properties>[] predicates) Combines multiple capability predicates using logical AND (All must match)
public static Predicate<Properties> anyOf(Predicate<Properties>[] predicates) Combines multiple capability predicates using logical OR (At least one must match)

Method Details

hasExactValue

public static Predicate<Properties> hasExactValue(String key, Object expectedValue)

Matches if a property has a specific exact value (matches JSON Schema types like String, Boolean, Number)


isTrue

public static Predicate<Properties> isTrue(String key)

Matches if a property is a boolean flag set to true


allOf

public static Predicate<Properties> allOf(Predicate<Properties>[] predicates)

Combines multiple capability predicates using logical AND (All must match)

Returns:

predicate


anyOf

public static Predicate<Properties> anyOf(Predicate<Properties>[] predicates)

Combines multiple capability predicates using logical OR (At least one must match)