cz.cuni.amis.pogamut.sposh.elements
Class FormalParameters

Package class diagram package FormalParameters
java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<FormalParameters.Parameter>
          extended by cz.cuni.amis.pogamut.sposh.elements.FormalParameters
All Implemented Interfaces:
Iterable<FormalParameters.Parameter>, Collection<FormalParameters.Parameter>, List<FormalParameters.Parameter>

public final class FormalParameters
extends AbstractList<FormalParameters.Parameter>

List of parameters for element. The only elements that can have parameters are Competence and ActionPattern. Specialized class is used instead of some Collection, because I want to keep order in which parameters were added, but also throw error on duplicates.

Author:
Honza

Nested Class Summary
static class FormalParameters.Parameter
          This class represents one formal parameter of C or AP.
 
Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
FormalParameters()
           
 
Method Summary
 void add(int index, FormalParameters.Parameter element)
           
 boolean containsVariable(String variableName)
          Does this list of formal parameters contains variable with name variableName?
 FormalParameters.Parameter get(int index)
           
 FormalParameters.Parameter remove(int index)
           
 FormalParameters.Parameter set(int index, FormalParameters.Parameter element)
           
 int size()
           
 String toString()
           
 
Methods inherited from class java.util.AbstractList
add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, subList
 
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
 

Constructor Detail

FormalParameters

public FormalParameters()
Method Detail

get

public FormalParameters.Parameter get(int index)
Specified by:
get in interface List<FormalParameters.Parameter>
Specified by:
get in class AbstractList<FormalParameters.Parameter>

size

public int size()
Specified by:
size in interface Collection<FormalParameters.Parameter>
Specified by:
size in interface List<FormalParameters.Parameter>
Specified by:
size in class AbstractCollection<FormalParameters.Parameter>

set

public FormalParameters.Parameter set(int index,
                                      FormalParameters.Parameter element)
Specified by:
set in interface List<FormalParameters.Parameter>
Overrides:
set in class AbstractList<FormalParameters.Parameter>

add

public void add(int index,
                FormalParameters.Parameter element)
Specified by:
add in interface List<FormalParameters.Parameter>
Overrides:
add in class AbstractList<FormalParameters.Parameter>

remove

public FormalParameters.Parameter remove(int index)
Specified by:
remove in interface List<FormalParameters.Parameter>
Overrides:
remove in class AbstractList<FormalParameters.Parameter>

containsVariable

public boolean containsVariable(String variableName)
Does this list of formal parameters contains variable with name variableName?

Parameters:
variableName - variableName we are checking.
Returns:
true if it contais variable with same name.

toString

public String toString()
Overrides:
toString in class AbstractCollection<FormalParameters.Parameter>


Copyright © 2014 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.