Package org.tweetyproject.commons
Class DualSetSignature<T,S>
java.lang.Object
org.tweetyproject.commons.DualSetSignature<T,S>
- Type Parameters:
T- The first type of formulas in this signature.S- The second type of formulas in this signature.
This class models a signature as two sets of formulas.
- Author:
- Matthias Thimm, Anna Gessler
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new empty signature.DualSetSignature(Set<T> args1, Set<S> args2) Creates a new signature with the given sets of formulas. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds the given formulas to the signature.voidaddAll(Collection<?> c) Adds all elements of this collection to this signature.voidaddSignature(Signature other) Adds the elements of the given signature to this signature.voidclear()Removes all elements of this signature.abstract DualSetSignature<T,S> clone()clones signaturebooleaninthashCode()booleanisEmpty()Returns true if this signature is empty.booleanisOverlappingSignature(Signature other) Checks whether this signature has common elements with the given signature, i.e.booleanisSubSignature(Signature other) Checks whether this signature is a sub-signature of the given signature, i.e.voidremoveAll(Collection<?> c) Removes all of this signature elements that are also contained in the specified collection (optional operation).toString()
-
Constructor Details
-
DualSetSignature
public DualSetSignature()Creates a new empty signature. -
DualSetSignature
Creates a new signature with the given sets of formulas.- Parameters:
args1- a set of formulasargs2- a set of formulas
-
-
Method Details
-
isSubSignature
Description copied from interface:SignatureChecks whether this signature is a sub-signature of the given signature, i.e. whether each logical expression expressible with this signature is also expressible with the given signature.- Specified by:
isSubSignaturein interfaceSignature- Parameters:
other- a signature.- Returns:
- "true" iff this signature is a sub-signature of the given one.
-
isOverlappingSignature
Description copied from interface:SignatureChecks whether this signature has common elements with the given signature, i.e. whether there are logical expressions expressible with this signature that are also expressible with the given signature.- Specified by:
isOverlappingSignaturein interfaceSignature- Parameters:
other- a signature.- Returns:
- "true" iff this signature is overlapping with the given one.
-
addSignature
Description copied from interface:SignatureAdds the elements of the given signature to this signature.- Specified by:
addSignaturein interfaceSignature- Parameters:
other- a signature.
-
hashCode
public int hashCode() -
equals
-
addAll
Description copied from interface:SignatureAdds all elements of this collection to this signature. -
add
Description copied from interface:SignatureAdds the given formulas to the signature.- Specified by:
addin interfaceSignature- Parameters:
objects- some objects to be added- Throws:
IllegalArgumentException
-
isEmpty
public boolean isEmpty()Description copied from interface:SignatureReturns true if this signature is empty. -
removeAll
Description copied from interface:SignatureRemoves all of this signature elements that are also contained in the specified collection (optional operation). After this call returns, this signature will contain no elements in common with the specified collection. -
clear
public void clear()Description copied from interface:SignatureRemoves all elements of this signature. After this call returns, this signature will contain no elements. -
toString
-
clone
Description copied from interface:Signatureclones signature
-