Class SerialisationSequence
java.lang.Object
org.tweetyproject.commons.AbstractInterpretation<DungTheory,Argument>
org.tweetyproject.arg.dung.semantics.AbstractArgumentationInterpretation<DungTheory>
org.tweetyproject.arg.dung.serialisability.semantics.SerialisationSequence
- All Implemented Interfaces:
Comparable<SerialisationSequence>,Iterable<Collection<? extends Argument>>,Collection<Collection<? extends Argument>>,List<Collection<? extends Argument>>,SequencedCollection<Collection<? extends Argument>>,Interpretation<DungTheory,Argument>
public class SerialisationSequence
extends AbstractArgumentationInterpretation<DungTheory>
implements List<Collection<? extends Argument>>, Comparable<SerialisationSequence>
Representation of a serialisation sequence,
i.e., a sequence of initial sets of the respective reducts.
- Author:
- Lars Bengel, Julian Sander
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionInitializes an empty serialisation sequenceSerialisationSequence(Collection<? extends Argument> arguments) Initializes a serialisation sequence withargumentsas the first elementSerialisationSequence(List<? extends Collection<? extends Argument>> sequence) Initializes a serialisation sequence starting with the given List of initial sets -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(int index, Collection<? extends Argument> element) booleanadd(Collection<? extends Argument> arguments) booleanaddAll(int index, Collection<? extends Collection<? extends Argument>> c) booleanaddAll(Collection<? extends Collection<? extends Argument>> c) voidclear()intbooleanChecks whether the given object is in the sequence.booleancontainsAll(Collection<?> c) booleanCollection<? extends Argument> get(int index) getArgumentsOfStatus(ArgumentStatus status) Returns all arguments that have the given status in this interpretation.Computes the corresponding extension as the union of all the sets in the sequenceinthashCode()intbooleanisEmpty()Iterator<Collection<? extends Argument>> iterator()intListIterator<Collection<? extends Argument>> ListIterator<Collection<? extends Argument>> listIterator(int index) Collection<? extends Argument> remove(int index) booleanRemoved the given initial set from the sequence.booleanremoveAll(Collection<?> c) booleanretainAll(Collection<?> c) Collection<? extends Argument> set(int index, Collection<? extends Argument> element) intsize()List<Collection<? extends Argument>> subList(int fromIndex, int toIndex) Object[]toArray()<T> T[]toArray(T[] a) toString()Methods inherited from class org.tweetyproject.arg.dung.semantics.AbstractArgumentationInterpretation
satisfies, satisfiesMethods inherited from class org.tweetyproject.commons.AbstractInterpretation
satisfiesMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.List
addFirst, addLast, getFirst, getLast, removeFirst, removeLast, replaceAll, reversed, sort, spliterator
-
Constructor Details
-
SerialisationSequence
public SerialisationSequence()Initializes an empty serialisation sequence -
SerialisationSequence
Initializes a serialisation sequence withargumentsas the first element- Parameters:
arguments- an initial set
-
SerialisationSequence
Initializes a serialisation sequence starting with the given List of initial sets- Parameters:
sequence- a sequence of initial sets
-
-
Method Details
-
getArgumentsOfStatus
Description copied from class:AbstractArgumentationInterpretationReturns all arguments that have the given status in this interpretation.- Specified by:
getArgumentsOfStatusin classAbstractArgumentationInterpretation<DungTheory>- Parameters:
status- the status of the arguments to be returned.- Returns:
- the set of arguments with the given status.
-
getExtension
Computes the corresponding extension as the union of all the sets in the sequence- Returns:
- An extension containing all arguments of this sequence
-
size
public int size()- Specified by:
sizein interfaceCollection<Collection<? extends Argument>>- Specified by:
sizein interfaceList<Collection<? extends Argument>>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<Collection<? extends Argument>>- Specified by:
isEmptyin interfaceList<Collection<? extends Argument>>
-
contains
Checks whether the given object is in the sequence.- Specified by:
containsin interfaceCollection<Collection<? extends Argument>>- Specified by:
containsin interfaceList<Collection<? extends Argument>>- Parameters:
o- element whose presence in this list is to be tested- Returns:
- true, if the element is present in the sequence
-
iterator
- Specified by:
iteratorin interfaceCollection<Collection<? extends Argument>>- Specified by:
iteratorin interfaceIterable<Collection<? extends Argument>>- Specified by:
iteratorin interfaceList<Collection<? extends Argument>>
-
toArray
- Specified by:
toArrayin interfaceCollection<Collection<? extends Argument>>- Specified by:
toArrayin interfaceList<Collection<? extends Argument>>
-
toArray
public <T> T[] toArray(T[] a) - Specified by:
toArrayin interfaceCollection<Collection<? extends Argument>>- Specified by:
toArrayin interfaceList<Collection<? extends Argument>>
-
add
- Specified by:
addin interfaceCollection<Collection<? extends Argument>>- Specified by:
addin interfaceList<Collection<? extends Argument>>
-
remove
Removed the given initial set from the sequence. If given an argument removes it from the initial set it occurs in.- Specified by:
removein interfaceCollection<Collection<? extends Argument>>- Specified by:
removein interfaceList<Collection<? extends Argument>>- Parameters:
o- element to be removed from this list, if present- Returns:
- true, if this list contained the specified element
-
containsAll
- Specified by:
containsAllin interfaceCollection<Collection<? extends Argument>>- Specified by:
containsAllin interfaceList<Collection<? extends Argument>>
-
addAll
- Specified by:
addAllin interfaceCollection<Collection<? extends Argument>>- Specified by:
addAllin interfaceList<Collection<? extends Argument>>
-
addAll
- Specified by:
addAllin interfaceList<Collection<? extends Argument>>
-
removeAll
- Specified by:
removeAllin interfaceCollection<Collection<? extends Argument>>- Specified by:
removeAllin interfaceList<Collection<? extends Argument>>
-
retainAll
- Specified by:
retainAllin interfaceCollection<Collection<? extends Argument>>- Specified by:
retainAllin interfaceList<Collection<? extends Argument>>
-
clear
public void clear()- Specified by:
clearin interfaceCollection<Collection<? extends Argument>>- Specified by:
clearin interfaceList<Collection<? extends Argument>>
-
get
- Specified by:
getin interfaceList<Collection<? extends Argument>>
-
set
- Specified by:
setin interfaceList<Collection<? extends Argument>>
-
add
- Specified by:
addin interfaceList<Collection<? extends Argument>>
-
remove
- Specified by:
removein interfaceList<Collection<? extends Argument>>
-
indexOf
- Specified by:
indexOfin interfaceList<Collection<? extends Argument>>
-
lastIndexOf
- Specified by:
lastIndexOfin interfaceList<Collection<? extends Argument>>
-
listIterator
- Specified by:
listIteratorin interfaceList<Collection<? extends Argument>>
-
listIterator
- Specified by:
listIteratorin interfaceList<Collection<? extends Argument>>
-
subList
- Specified by:
subListin interfaceList<Collection<? extends Argument>>
-
equals
- Specified by:
equalsin interfaceCollection<Collection<? extends Argument>>- Specified by:
equalsin interfaceList<Collection<? extends Argument>>- Overrides:
equalsin classObject
-
compareTo
- Specified by:
compareToin interfaceComparable<SerialisationSequence>
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceCollection<Collection<? extends Argument>>- Specified by:
hashCodein interfaceList<Collection<? extends Argument>>- Overrides:
hashCodein classObject
-
toString
- Specified by:
toStringin classAbstractArgumentationInterpretation<DungTheory>
-