Package com.osohq.oso_cloud
Class FactPattern
- java.lang.Object
-
- com.osohq.oso_cloud.FactPattern
-
public class FactPattern extends java.lang.ObjectRepresents a pattern to match facts stored in Oso Cloud.Allows using concrete values (
Value), type wildcards (ValueOfType), or complete wildcards (ValuePattern.ANY) for arguments.
-
-
Field Summary
Fields Modifier and Type Field Description java.util.List<ValuePattern>argsjava.lang.Stringpredicate
-
Constructor Summary
Constructors Constructor Description FactPattern(java.lang.String predicate, ValuePattern... args)Creates a fact pattern with a specific predicate.FactPattern(java.lang.String predicate, java.util.List<ValuePattern> args)Creates a fact pattern with a specific predicate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)inthashCode()java.lang.StringtoString()
-
-
-
Field Detail
-
predicate
public final java.lang.String predicate
-
args
public final java.util.List<ValuePattern> args
-
-
Constructor Detail
-
FactPattern
public FactPattern(java.lang.String predicate, ValuePattern... args)Creates a fact pattern with a specific predicate.- Parameters:
predicate- The predicate of the fact to match. Must not be null.args- The arguments to match. Can containValue,ValueOfType, orValuePattern.ANY.- Throws:
java.lang.IllegalArgumentException- if predicate is null or any arg is null.
-
FactPattern
public FactPattern(java.lang.String predicate, java.util.List<ValuePattern> args)Creates a fact pattern with a specific predicate.- Parameters:
predicate- The predicate of the fact to match. Must not be null.args- The arguments to match as a List. Can containValue,ValueOfType, orValuePattern.ANY.- Throws:
java.lang.IllegalArgumentException- if predicate is null or any arg is null.
-
-