gov.nasa.pds.tools.label
Class Sequence

java.lang.Object
  extended by gov.nasa.pds.tools.label.Sequence
All Implemented Interfaces:
Value, java.lang.Iterable, java.util.Collection, java.util.List

public class Sequence
extends java.lang.Object
implements java.util.List, Value

This class implements the List interface to hide its backing. It is a ordered set of Value. A sequence can appear on the right hand side of an AttributeStatement.

Version:
$Revision: 2606 $
Author:
pramirez

Constructor Summary
Sequence()
          Constructs an empty sequence of values.
Sequence(java.util.List values)
          Constructs a sequence with the ordered value
 
Method Summary
 void add(int index, java.lang.Object object)
           
 boolean add(java.lang.Object object)
           
 boolean addAll(java.util.Collection values)
           
 boolean addAll(int index, java.util.Collection values)
           
 void clear()
           
 boolean contains(java.lang.Object object)
           
 boolean containsAll(java.util.Collection values)
           
 java.lang.Object get(int index)
           
 Value getValue(int index)
           
 int indexOf(java.lang.Object object)
           
 boolean isEmpty()
           
 java.util.Iterator iterator()
           
 int lastIndexOf(java.lang.Object object)
           
 java.util.ListIterator listIterator()
           
 java.util.ListIterator listIterator(int index)
           
 java.lang.Object remove(int index)
           
 boolean remove(java.lang.Object object)
           
 boolean removeAll(java.util.Collection values)
           
 Scalar removeScalar(int index)
           
 boolean retainAll(java.util.Collection values)
           
 java.lang.Object set(int index, java.lang.Object object)
           
 Value set(int index, Value value)
           
 int size()
           
 java.util.List subList(int fromIndex, int toIndex)
           
 java.lang.Object[] toArray()
           
 java.lang.Object[] toArray(java.lang.Object[] objects)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.List
equals, hashCode
 

Constructor Detail

Sequence

public Sequence()
Constructs an empty sequence of values.


Sequence

public Sequence(java.util.List values)
Constructs a sequence with the ordered value

Parameters:
values - to load into sequence
Method Detail

containsAll

public boolean containsAll(java.util.Collection values)
Specified by:
containsAll in interface java.util.Collection
Specified by:
containsAll in interface java.util.List

addAll

public boolean addAll(java.util.Collection values)
Specified by:
addAll in interface java.util.Collection
Specified by:
addAll in interface java.util.List

addAll

public boolean addAll(int index,
                      java.util.Collection values)
Specified by:
addAll in interface java.util.List

removeAll

public boolean removeAll(java.util.Collection values)
Specified by:
removeAll in interface java.util.Collection
Specified by:
removeAll in interface java.util.List

retainAll

public boolean retainAll(java.util.Collection values)
Specified by:
retainAll in interface java.util.Collection
Specified by:
retainAll in interface java.util.List

clear

public void clear()
Specified by:
clear in interface java.util.Collection
Specified by:
clear in interface java.util.List

getValue

public Value getValue(int index)

set

public Value set(int index,
                 Value value)

removeScalar

public Scalar removeScalar(int index)

listIterator

public java.util.ListIterator listIterator()
Specified by:
listIterator in interface java.util.List

listIterator

public java.util.ListIterator listIterator(int index)
Specified by:
listIterator in interface java.util.List

subList

public java.util.List subList(int fromIndex,
                              int toIndex)
Specified by:
subList in interface java.util.List

contains

public boolean contains(java.lang.Object object)
Specified by:
contains in interface java.util.Collection
Specified by:
contains in interface java.util.List

toArray

public java.lang.Object[] toArray(java.lang.Object[] objects)
Specified by:
toArray in interface java.util.Collection
Specified by:
toArray in interface java.util.List

add

public boolean add(java.lang.Object object)
Specified by:
add in interface java.util.Collection
Specified by:
add in interface java.util.List

remove

public boolean remove(java.lang.Object object)
Specified by:
remove in interface java.util.Collection
Specified by:
remove in interface java.util.List

set

public java.lang.Object set(int index,
                            java.lang.Object object)
Specified by:
set in interface java.util.List

add

public void add(int index,
                java.lang.Object object)
Specified by:
add in interface java.util.List

indexOf

public int indexOf(java.lang.Object object)
Specified by:
indexOf in interface java.util.List

lastIndexOf

public int lastIndexOf(java.lang.Object object)
Specified by:
lastIndexOf in interface java.util.List

toArray

public java.lang.Object[] toArray()
Specified by:
toArray in interface java.util.Collection
Specified by:
toArray in interface java.util.List

get

public java.lang.Object get(int index)
Specified by:
get in interface java.util.List

remove

public java.lang.Object remove(int index)
Specified by:
remove in interface java.util.List

size

public int size()
Specified by:
size in interface java.util.Collection
Specified by:
size in interface java.util.List

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface java.util.Collection
Specified by:
isEmpty in interface java.util.List

iterator

public java.util.Iterator iterator()
Specified by:
iterator in interface java.lang.Iterable
Specified by:
iterator in interface java.util.Collection
Specified by:
iterator in interface java.util.List


Copyright © 2005-2009 NASA Jet Propulsion Laboratory, California Institute of Technology. All Rights Reserved.