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
ConstructorDescriptionInitializes an empty serialisation sequenceSerialisationSequence
(Collection<? extends Argument> arguments) Initializes a serialisation sequence witharguments
as 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 TypeMethodDescriptionvoid
add
(int index, Collection<? extends Argument> element) boolean
add
(Collection<? extends Argument> arguments) boolean
addAll
(int index, Collection<? extends Collection<? extends Argument>> c) boolean
addAll
(Collection<? extends Collection<? extends Argument>> c) void
clear()
int
boolean
Checks whether the given object is in the sequence.boolean
containsAll
(Collection<?> c) boolean
Collection
<? 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 sequenceint
hashCode()
int
boolean
isEmpty()
Iterator
<Collection<? extends Argument>> iterator()
int
ListIterator
<Collection<? extends Argument>> ListIterator
<Collection<? extends Argument>> listIterator
(int index) Collection
<? extends Argument> remove
(int index) boolean
Removed the given initial set from the sequence.boolean
removeAll
(Collection<?> c) boolean
retainAll
(Collection<?> c) Collection
<? extends Argument> set
(int index, Collection<? extends Argument> element) int
size()
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, satisfies
Methods inherited from class org.tweetyproject.commons.AbstractInterpretation
satisfies
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods 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 witharguments
as 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:AbstractArgumentationInterpretation
Returns all arguments that have the given status in this interpretation.- Specified by:
getArgumentsOfStatus
in 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:
size
in interfaceCollection<Collection<? extends Argument>>
- Specified by:
size
in interfaceList<Collection<? extends Argument>>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceCollection<Collection<? extends Argument>>
- Specified by:
isEmpty
in interfaceList<Collection<? extends Argument>>
-
contains
Checks whether the given object is in the sequence.- Specified by:
contains
in interfaceCollection<Collection<? extends Argument>>
- Specified by:
contains
in 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:
iterator
in interfaceCollection<Collection<? extends Argument>>
- Specified by:
iterator
in interfaceIterable<Collection<? extends Argument>>
- Specified by:
iterator
in interfaceList<Collection<? extends Argument>>
-
toArray
- Specified by:
toArray
in interfaceCollection<Collection<? extends Argument>>
- Specified by:
toArray
in interfaceList<Collection<? extends Argument>>
-
toArray
public <T> T[] toArray(T[] a) - Specified by:
toArray
in interfaceCollection<Collection<? extends Argument>>
- Specified by:
toArray
in interfaceList<Collection<? extends Argument>>
-
add
- Specified by:
add
in interfaceCollection<Collection<? extends Argument>>
- Specified by:
add
in 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:
remove
in interfaceCollection<Collection<? extends Argument>>
- Specified by:
remove
in 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:
containsAll
in interfaceCollection<Collection<? extends Argument>>
- Specified by:
containsAll
in interfaceList<Collection<? extends Argument>>
-
addAll
- Specified by:
addAll
in interfaceCollection<Collection<? extends Argument>>
- Specified by:
addAll
in interfaceList<Collection<? extends Argument>>
-
addAll
- Specified by:
addAll
in interfaceList<Collection<? extends Argument>>
-
removeAll
- Specified by:
removeAll
in interfaceCollection<Collection<? extends Argument>>
- Specified by:
removeAll
in interfaceList<Collection<? extends Argument>>
-
retainAll
- Specified by:
retainAll
in interfaceCollection<Collection<? extends Argument>>
- Specified by:
retainAll
in interfaceList<Collection<? extends Argument>>
-
clear
public void clear()- Specified by:
clear
in interfaceCollection<Collection<? extends Argument>>
- Specified by:
clear
in interfaceList<Collection<? extends Argument>>
-
get
- Specified by:
get
in interfaceList<Collection<? extends Argument>>
-
set
- Specified by:
set
in interfaceList<Collection<? extends Argument>>
-
add
- Specified by:
add
in interfaceList<Collection<? extends Argument>>
-
remove
- Specified by:
remove
in interfaceList<Collection<? extends Argument>>
-
indexOf
- Specified by:
indexOf
in interfaceList<Collection<? extends Argument>>
-
lastIndexOf
- Specified by:
lastIndexOf
in interfaceList<Collection<? extends Argument>>
-
listIterator
- Specified by:
listIterator
in interfaceList<Collection<? extends Argument>>
-
listIterator
- Specified by:
listIterator
in interfaceList<Collection<? extends Argument>>
-
subList
- Specified by:
subList
in interfaceList<Collection<? extends Argument>>
-
equals
- Specified by:
equals
in interfaceCollection<Collection<? extends Argument>>
- Specified by:
equals
in interfaceList<Collection<? extends Argument>>
- Overrides:
equals
in classObject
-
compareTo
- Specified by:
compareTo
in interfaceComparable<SerialisationSequence>
-
hashCode
public int hashCode()- Specified by:
hashCode
in interfaceCollection<Collection<? extends Argument>>
- Specified by:
hashCode
in interfaceList<Collection<? extends Argument>>
- Overrides:
hashCode
in classObject
-
toString
- Specified by:
toString
in classAbstractArgumentationInterpretation<DungTheory>
-