Class ContainsSimilar
java.lang.Object
com.semedy.reasoner.builtin.filter.ContainsSimilar
- All Implemented Interfaces:
Builtin
,FilterBuiltin
,VariableArgumentLengthBuiltin
Checks whether similar words are contained in String
- Author:
- Jürgen Angele
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
frees up allocated resourcesclone the builtinvoid
call back function.String[]
get descriptions for the different argumentsint
getArity()
get the arity of the builtinget a description for the builtinint
int
getName()
get the name of the builtingetType()
get the type of the builtinlong
the weight of the builtin.void
initialize the builtinboolean
isEvaluable
(BitSet grounds, BitSet variableInstantiations, Object[] args) is builtin evaluable with a certain instantiation of variablesboolean
is it a builtin for internal use onlyboolean
isTrue
(long[] input) is built-in true for given argumentsobjectGeneratingArguments
(BitSet grounds, BitSet variableInstantiations, Object[] args) In which argument position are new objects createdboolean
does the builtin read the symbol tablevoid
setProperties
(Properties prp) set the sytem propertiesvoid
setSymbolTable
(SymbolTable symbolTable) set the symbol tableboolean
does the builtin write into the symbol table
-
Constructor Details
-
ContainsSimilar
public ContainsSimilar()
-
-
Method Details
-
setSymbolTable
Description copied from interface:Builtin
set the symbol table- Specified by:
setSymbolTable
in interfaceBuiltin
- Parameters:
symbolTable
- , the symbol table
-
setProperties
Description copied from interface:Builtin
set the sytem properties- Specified by:
setProperties
in interfaceBuiltin
- Parameters:
prp
- , properties
-
isTrue
Description copied from interface:FilterBuiltin
is built-in true for given arguments- Specified by:
isTrue
in interfaceFilterBuiltin
- Parameters:
input
- , the arguments- Returns:
- Throws:
InterruptedException
IOException
ReasoningException
SemReasonerException
-
isEvaluable
public boolean isEvaluable(BitSet grounds, BitSet variableInstantiations, Object[] args) throws BuiltinException Description copied from interface:Builtin
is builtin evaluable with a certain instantiation of variables- Specified by:
isEvaluable
in interfaceBuiltin
- Parameters:
grounds
- , which arguments are groundvariableInstantiations
- , which variables are instantiatedargs
- , the arguments- Returns:
- was it evaluable
- Throws:
BuiltinException
-
init
Description copied from interface:Builtin
initialize the builtin- Specified by:
init
in interfaceBuiltin
- Parameters:
args
- , the builtin arguments- Throws:
InterruptedException
SemReasonerException
-
evaluationFinished
Description copied from interface:Builtin
call back function. Is called when the whole evaluation has been finished- Specified by:
evaluationFinished
in interfaceBuiltin
- Throws:
BuiltinException
InterruptedException
-
getWeight
Description copied from interface:Builtin
the weight of the builtin. Determines when the builtin is executed in a rule -
objectGeneratingArguments
public BitSet objectGeneratingArguments(BitSet grounds, BitSet variableInstantiations, Object[] args) throws BuiltinException Description copied from interface:Builtin
In which argument position are new objects created- Specified by:
objectGeneratingArguments
in interfaceBuiltin
- Parameters:
grounds
- , ground argument positionsvariableInstantiations
- , instantiated variablesargs
- , arguments of the literal- Returns:
- each bit indicates the argument position where new objects are created
- Throws:
BuiltinException
-
getName
Description copied from interface:Builtin
get the name of the builtin -
getArity
public int getArity()Description copied from interface:Builtin
get the arity of the builtin -
getType
Description copied from interface:Builtin
get the type of the builtin -
isInternal
public boolean isInternal()Description copied from interface:Builtin
is it a builtin for internal use only- Specified by:
isInternal
in interfaceBuiltin
- Returns:
-
getDescription
Description copied from interface:Builtin
get a description for the builtin- Specified by:
getDescription
in interfaceBuiltin
- Returns:
- a description of the built-in
-
getArgumentDescriptions
Description copied from interface:Builtin
get descriptions for the different arguments- Specified by:
getArgumentDescriptions
in interfaceBuiltin
- Returns:
- a description of the arguments of the built-in
-
readsSymbolTable
public boolean readsSymbolTable()Description copied from interface:Builtin
does the builtin read the symbol table- Specified by:
readsSymbolTable
in interfaceBuiltin
- Returns:
- true if it reads the symbol table
-
writesSymbolTable
public boolean writesSymbolTable()Description copied from interface:Builtin
does the builtin write into the symbol table- Specified by:
writesSymbolTable
in interfaceBuiltin
- Returns:
- true if it writes to the symbol table
-
cloneBuiltin
Description copied from interface:Builtin
clone the builtin- Specified by:
cloneBuiltin
in interfaceBuiltin
- Returns:
- the cloned built-in
-
clear
public void clear()Description copied from interface:Builtin
frees up allocated resources -
getMinLength
public int getMinLength() -
getMaxLength
public int getMaxLength()
-