eu.reservoir.monitoring.core.list
Class DefaultMList

java.lang.Object
  extended by eu.reservoir.monitoring.core.list.DefaultMList
All Implemented Interfaces:
MList, java.io.Serializable

public class DefaultMList
extends java.lang.Object
implements MList

A default implementation of a MList.

See Also:
Serialized Form

Constructor Summary
DefaultMList(ProbeAttributeType listType)
          Construct a MList.
 
Method Summary
 MList add(MListValue value)
          Add some data value to the list.
 MList add(java.lang.Object value)
          Add an object value to the list.
 MListValue get(int n)
          Get the Nth element from a list.
 ProbeAttributeType getType()
          Get the type of the elements for a MList.
 MList set(int n, MListValue value)
          Set the Nth element of a list.
 int size()
          Get the size of the list.
 java.util.List<MListValue> toList()
          Convert the MList to a List.
 java.lang.String toString()
          To string
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultMList

public DefaultMList(ProbeAttributeType listType)
Construct a MList.

Method Detail

size

public int size()
Get the size of the list.

Specified by:
size in interface MList

get

public MListValue get(int n)
Get the Nth element from a list.

Specified by:
get in interface MList

set

public MList set(int n,
                 MListValue value)
          throws TypeException
Set the Nth element of a list.

Specified by:
set in interface MList
Throws:
TypeException

add

public MList add(MListValue value)
          throws TypeException
Add some data value to the list.

Specified by:
add in interface MList
Throws:
TypeException

add

public MList add(java.lang.Object value)
          throws TypeException
Add an object value to the list. This throws an Error if the type of the value is not one supported by ProbeAttributeType.

Specified by:
add in interface MList
Throws:
TypeException

toList

public java.util.List<MListValue> toList()
Convert the MList to a List.

Specified by:
toList in interface MList

getType

public ProbeAttributeType getType()
Get the type of the elements for a MList. e.g. INTEGER

Specified by:
getType in interface MList

toString

public java.lang.String toString()
To string

Overrides:
toString in class java.lang.Object


RESERVOIR Monitoring 0.6.4