public class FolSignature extends Signature
Modifier and Type | Field and Description |
---|---|
private java.util.Set<Constant> |
constants |
private java.util.Set<Functor> |
functors |
private java.util.Set<Predicate> |
predicates |
private java.util.Set<Sort> |
sorts |
Constructor and Description |
---|
FolSignature()
Creates an empty signature
|
FolSignature(java.util.Collection<?> c)
Creates a signature with the given objects (should be sorts, constants,
predicates, functors, or formulas).
|
Modifier and Type | Method and Description |
---|---|
void |
add(java.lang.Object obj)
Adds the given object, either a constant, a sort, a predicate, or a functor,
to this signature.
|
void |
addAll(java.util.Collection<?> c)
Adds items of the given collection to this signature.
|
void |
addSignature(Signature other)
Adds the elements of the given signature to this signature.
|
boolean |
containsConstant(java.lang.String s) |
boolean |
containsFunctor(java.lang.String s) |
boolean |
containsPredicate(java.lang.String s) |
boolean |
containsSort(java.lang.String s) |
boolean |
equals(java.lang.Object obj) |
Constant |
getConstant(java.lang.String s) |
java.util.Set<Constant> |
getConstants() |
Functor |
getFunctor(java.lang.String s) |
java.util.Set<Functor> |
getFunctors() |
Predicate |
getPredicate(java.lang.String s) |
java.util.Set<Predicate> |
getPredicates() |
Sort |
getSort(java.lang.String s) |
java.util.Set<Sort> |
getSorts() |
int |
hashCode() |
boolean |
isOverlappingSignature(Signature other)
Checks whether this signature has common elements with the
given signature, i.e.
|
boolean |
isRepresentable(FolFormula folFormula)
Checks whether the given formula can be represented by this signature.
|
boolean |
isSubSignature(Signature other)
Checks whether this signature is a sub-signature of the
given signature, i.e.
|
private java.util.Set<Constant> constants
private java.util.Set<Sort> sorts
private java.util.Set<Predicate> predicates
private java.util.Set<Functor> functors
public FolSignature()
public FolSignature(java.util.Collection<?> c) throws java.lang.IllegalArgumentException
c
- a collection of items to be added.java.lang.IllegalArgumentException
- if at least one of the given objects is
neither a constant, a sort, a predicate, a functor, or a formula.public boolean isSubSignature(Signature other)
Signature
isSubSignature
in class Signature
other
- a signature.public boolean isOverlappingSignature(Signature other)
Signature
isOverlappingSignature
in class Signature
other
- a signature.public void add(java.lang.Object obj) throws java.lang.IllegalArgumentException
obj
- the object to be added, either a constant, a sort, a predicate, a functor,
or a formula.java.lang.IllegalArgumentException
- if the given object is neither a constant, a sort, a
predicate, a functor, or a formula.public void addAll(java.util.Collection<?> c) throws java.lang.IllegalArgumentException
c
- the collection of items to be addedjava.lang.IllegalArgumentException
- if at least one of the given objects is
neither a constant, a sort, a predicate, a functor, or a formula.public boolean isRepresentable(FolFormula folFormula)
folFormula
- A formula to be checked.public java.util.Set<Constant> getConstants()
public java.util.Set<Predicate> getPredicates()
public java.util.Set<Functor> getFunctors()
public java.util.Set<Sort> getSorts()
public Constant getConstant(java.lang.String s)
public Predicate getPredicate(java.lang.String s)
public Functor getFunctor(java.lang.String s)
public Sort getSort(java.lang.String s)
public boolean containsConstant(java.lang.String s)
public boolean containsPredicate(java.lang.String s)
public boolean containsFunctor(java.lang.String s)
public boolean containsSort(java.lang.String s)
public void addSignature(Signature other)
Signature
addSignature
in class Signature
other
- a signature.