tom.engine.adt.tomoption.types
Class OptionList

java.lang.Object
  extended by tom.engine.adt.tomoption.TomOptionAbstractType
      extended by tom.engine.adt.tomoption.types.OptionList
All Implemented Interfaces:
Comparable, shared.SharedObject, shared.SharedObjectWithID, Visitable
Direct Known Subclasses:
concOption

public abstract class OptionList
extends TomOptionAbstractType


Field Summary
protected static IdConverter idConv
           
 
Fields inherited from class tom.engine.adt.tomoption.TomOptionAbstractType
atermFactory, factory
 
Constructor Summary
protected OptionList()
          Sole constructor.
 
Method Summary
static OptionList fromStream(InputStream stream)
          Returns a tom.engine.adt.tomoption.types.OptionList from a Stream without any conversion
static OptionList fromStream(InputStream stream, ATermConverter atConv)
          Apply a conversion on the ATerm contained in the Stream and returns a tom.engine.adt.tomoption.types.OptionList from it
static OptionList fromString(String s)
          Returns a tom.engine.adt.tomoption.types.OptionList from a String without any conversion
static OptionList fromString(String s, ATermConverter atConv)
          Apply a conversion on the ATerm contained in the String and returns a tom.engine.adt.tomoption.types.OptionList from it
static OptionList fromTerm(aterm.ATerm trm)
          Returns a tom.engine.adt.tomoption.types.OptionList from an ATerm without any conversion
static OptionList fromTerm(aterm.ATerm trm, ATermConverter atConv)
          Apply a conversion on the ATerm and returns a tom.engine.adt.tomoption.types.OptionList
 Collection<Option> getCollectionconcOption()
          Returns a Collection extracted from the term
 Option getHeadconcOption()
          Returns the subterm corresponding to the slot HeadconcOption
 OptionList getTailconcOption()
          Returns the subterm corresponding to the slot TailconcOption
 boolean isConsconcOption()
          Returns true if the term is rooted by the symbol ConsconcOption
 boolean isEmptyconcOption()
          Returns true if the term is rooted by the symbol EmptyconcOption
 int length()
          Returns the length of the list
 OptionList reverse()
          Returns an inverted term
 OptionList setHeadconcOption(Option _arg)
          Returns a new term where the subterm corresponding to the slot HeadconcOption is replaced by the term given in argument.
 OptionList setTailconcOption(OptionList _arg)
          Returns a new term where the subterm corresponding to the slot TailconcOption is replaced by the term given in argument.
 aterm.ATerm toATerm()
          Returns an ATerm representation of this term.
 
Methods inherited from class tom.engine.adt.tomoption.TomOptionAbstractType
compareTo, compareToLPO, convertATermToBoolean, convertATermToChar, convertATermToDouble, convertATermToFloat, convertATermToInt, convertATermToLong, convertATermToString, getUniqueIdentifier, setUniqueIdentifier, symbolName, toString, toStringBuilder
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface shared.SharedObject
duplicate, equivalent, hashCode
 
Methods inherited from interface tom.library.sl.Visitable
getChildAt, getChildCount, getChildren, setChildAt, setChildren
 

Field Detail

idConv

protected static IdConverter idConv
Constructor Detail

OptionList

protected OptionList()
Sole constructor. (For invocation by subclass constructors, typically implicit.)

Method Detail

isConsconcOption

public boolean isConsconcOption()
Returns true if the term is rooted by the symbol ConsconcOption

Returns:
true if the term is rooted by the symbol ConsconcOption

isEmptyconcOption

public boolean isEmptyconcOption()
Returns true if the term is rooted by the symbol EmptyconcOption

Returns:
true if the term is rooted by the symbol EmptyconcOption

getTailconcOption

public OptionList getTailconcOption()
Returns the subterm corresponding to the slot TailconcOption

Returns:
the subterm corresponding to the slot TailconcOption

setTailconcOption

public OptionList setTailconcOption(OptionList _arg)
Returns a new term where the subterm corresponding to the slot TailconcOption is replaced by the term given in argument. Note that there is no side-effect: a new term is returned and the original term is left unchanged

Parameters:
_arg - the value of the new subterm
Returns:
a new term where the subterm corresponding to the slot TailconcOption is replaced by _arg

getHeadconcOption

public Option getHeadconcOption()
Returns the subterm corresponding to the slot HeadconcOption

Returns:
the subterm corresponding to the slot HeadconcOption

setHeadconcOption

public OptionList setHeadconcOption(Option _arg)
Returns a new term where the subterm corresponding to the slot HeadconcOption is replaced by the term given in argument. Note that there is no side-effect: a new term is returned and the original term is left unchanged

Parameters:
_arg - the value of the new subterm
Returns:
a new term where the subterm corresponding to the slot HeadconcOption is replaced by _arg

toATerm

public aterm.ATerm toATerm()
Returns an ATerm representation of this term.

Specified by:
toATerm in class TomOptionAbstractType
Returns:
null to indicate to sub-classes that they have to work

fromTerm

public static OptionList fromTerm(aterm.ATerm trm)
Returns a tom.engine.adt.tomoption.types.OptionList from an ATerm without any conversion

Parameters:
trm - ATerm to handle to retrieve a Gom term
Returns:
the term from the ATerm

fromString

public static OptionList fromString(String s)
Returns a tom.engine.adt.tomoption.types.OptionList from a String without any conversion

Parameters:
s - String containing the ATerm
Returns:
the term from the String

fromStream

public static OptionList fromStream(InputStream stream)
                             throws IOException
Returns a tom.engine.adt.tomoption.types.OptionList from a Stream without any conversion

Parameters:
stream - stream containing the ATerm
Returns:
the term from the Stream
Throws:
IOException - if a problem occurs with the stream

fromTerm

public static OptionList fromTerm(aterm.ATerm trm,
                                  ATermConverter atConv)
Apply a conversion on the ATerm and returns a tom.engine.adt.tomoption.types.OptionList

Parameters:
trm - ATerm to convert into a Gom term
atConv - ATermConverter used to convert the ATerm
Returns:
the Gom term
Throws:
IllegalArgumentException

fromString

public static OptionList fromString(String s,
                                    ATermConverter atConv)
Apply a conversion on the ATerm contained in the String and returns a tom.engine.adt.tomoption.types.OptionList from it

Parameters:
s - String containing the ATerm
atConv - ATerm Converter used to convert the ATerm
Returns:
the Gom term

fromStream

public static OptionList fromStream(InputStream stream,
                                    ATermConverter atConv)
                             throws IOException
Apply a conversion on the ATerm contained in the Stream and returns a tom.engine.adt.tomoption.types.OptionList from it

Parameters:
stream - stream containing the ATerm
atConv - ATerm Converter used to convert the ATerm
Returns:
the Gom term
Throws:
IOException

length

public int length()
Returns the length of the list

Returns:
the length of the list
Throws:
IllegalArgumentException - if the term is not a list

reverse

public OptionList reverse()
Returns an inverted term

Returns:
the inverted list
Throws:
IllegalArgumentException - if the term is not a list

getCollectionconcOption

public Collection<Option> getCollectionconcOption()
Returns a Collection extracted from the term

Returns:
the collection
Throws:
UnsupportedOperationException - if the term is not a list