Package net.sf.tweety.logics.pl.syntax
Class PlSignature
- java.lang.Object
-
- net.sf.tweety.commons.SingleSetSignature<Proposition>
-
- net.sf.tweety.logics.pl.syntax.PlSignature
-
- All Implemented Interfaces:
java.lang.Cloneable
,java.lang.Iterable<Proposition>
,Signature
public class PlSignature extends SingleSetSignature<Proposition>
This class captures the signature of a specific propositional language.- Author:
- Matthias Thimm, Sebastian Homann
-
-
Constructor Summary
Constructors Constructor Description PlSignature()
Creates a new (empty) propositional signature.PlSignature(int numvars)
Creates a new propositional signature with the given number of propositions (named "A0"..."Anumvars".PlSignature(java.util.Collection<? extends Proposition> propositions)
Creates a new propositional signature with the given set of propositions.PlSignature(PlSignature sig)
Creates a new propositional signature that is a copy of the given signature.
-
Method Summary
Modifier and Type Method Description void
add(java.lang.Object obj)
Adds the given formula to this signature.PlSignature
clone()
static PlSignature
getSignature(java.util.Collection<? extends PlFormula> formulas)
Returns the set of atoms appearing in the given collection of formulas.-
Methods inherited from class net.sf.tweety.commons.SingleSetSignature
add, addAll, addSignature, clear, contains, containsAll, equals, hashCode, isEmpty, isOverlappingSignature, isSubSignature, iterator, remove, removeAll, retainAll, size, toArray, toCollection, toString
-
-
-
-
Constructor Detail
-
PlSignature
public PlSignature()
Creates a new (empty) propositional signature.
-
PlSignature
public PlSignature(java.util.Collection<? extends Proposition> propositions)
Creates a new propositional signature with the given set of propositions.- Parameters:
propositions
- a set of propositions.
-
PlSignature
public PlSignature(int numvars)
Creates a new propositional signature with the given number of propositions (named "A0"..."Anumvars".- Parameters:
numvars
- the number of variables.
-
PlSignature
public PlSignature(PlSignature sig)
Creates a new propositional signature that is a copy of the given signature.- Parameters:
sig
- a signature
-
-
Method Detail
-
getSignature
public static PlSignature getSignature(java.util.Collection<? extends PlFormula> formulas)
Returns the set of atoms appearing in the given collection of formulas.- Parameters:
formulas
- a set of propositional formulas- Returns:
- the signature of the formulas.
-
add
public void add(java.lang.Object obj)
Description copied from interface:Signature
Adds the given formula to this signature.- Parameters:
obj
- some object
-
clone
public PlSignature clone()
- Specified by:
clone
in interfaceSignature
- Specified by:
clone
in classSingleSetSignature<Proposition>
-
-