org.lastbamboo.common.sdp.fields
Class SDPObjectList

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.AbstractSequentialList<E>
              extended by java.util.LinkedList
                  extended by org.lastbamboo.common.sdp.GenericObjectList
                      extended by org.lastbamboo.common.sdp.fields.SDPObjectList
All Implemented Interfaces:
Serializable, Cloneable, Iterable, Collection, Deque, List, Queue

public class SDPObjectList
extends GenericObjectList

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.lastbamboo.common.sdp.GenericObjectList
AND, AT, COLON, COMMA, DOT, DOUBLE_QUOTE, EQUALS, GREATER_THAN, HT, indentation, LESS_THAN, listName, LPAREN, myClass, NEWLINE, PERCENT, POUND, QUESTION, QUOTE, RETURN, RPAREN, SEMICOLON, separator, SLASH, SP, STAR
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
SDPObjectList()
           
SDPObjectList(String lname)
           
SDPObjectList(String lname, Class clazz)
          Get the input text of the sdp object (from which the object was generated).
 
Method Summary
 void add(SDPObject s)
          Add an sdp object to this list.
 String encode()
          Encode the list in semicolon separated form.
 GenericObject first()
          This is the default list iterator.This will not handle nested list traversal.
 void mergeObjects(GenericObjectList mergeList)
          Do a merge of the GenericObjects contained in this list with the GenericObjects in the mergeList.
 GenericObject next()
          Fetch the next object from the list based on the default list iterator
 GenericObject next(ListIterator li)
          Traverse the list given a list iterator
 void replace(String objectText, GenericObject replacementObject, boolean matchSubstring)
          Do a find and replace of objects in this list.
 void replace(String objectText, GenericObjectList replacementObject, boolean matchSubstring)
          Do a find and replace of objects in this list.
 String toString()
          Alias for the encode function above.
 
Methods inherited from class org.lastbamboo.common.sdp.GenericObjectList
add, add, addFirst, clone, concatenate, concatenate, debugDump, debugDump, equals, getIndentation, getIterator, getMyClass, isCloneable, isMySubclass, match, replace, replace, setMyClass, setSeparator
 
Methods inherited from class java.util.LinkedList
add, addAll, addAll, addLast, clear, contains, descendingIterator, element, get, getFirst, getLast, indexOf, lastIndexOf, listIterator, offer, offerFirst, offerLast, peek, peekFirst, peekLast, poll, pollFirst, pollLast, pop, push, remove, remove, remove, removeFirst, removeFirstOccurrence, removeLast, removeLastOccurrence, set, size, toArray, toArray
 
Methods inherited from class java.util.AbstractSequentialList
iterator
 
Methods inherited from class java.util.AbstractList
hashCode, listIterator, removeRange, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, isEmpty, removeAll, retainAll
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, hashCode, isEmpty, iterator, listIterator, removeAll, retainAll, subList
 
Methods inherited from interface java.util.Deque
iterator
 

Constructor Detail

SDPObjectList

public SDPObjectList(String lname,
                     Class clazz)
Get the input text of the sdp object (from which the object was generated).


SDPObjectList

public SDPObjectList()

SDPObjectList

public SDPObjectList(String lname)
Method Detail

mergeObjects

public void mergeObjects(GenericObjectList mergeList)
Do a merge of the GenericObjects contained in this list with the GenericObjects in the mergeList. Note that this does an inplace modification of the given list. This does an object by object merge of the given objects.

Overrides:
mergeObjects in class GenericObjectList
Parameters:
mergeList - is the list of Generic objects that we want to do an object by object merge with. Note that no new objects are added to this list.

add

public void add(SDPObject s)
Add an sdp object to this list.


first

public GenericObject first()
Description copied from class: GenericObjectList
This is the default list iterator.This will not handle nested list traversal.

Overrides:
first in class GenericObjectList

next

public GenericObject next()
Description copied from class: GenericObjectList
Fetch the next object from the list based on the default list iterator

Overrides:
next in class GenericObjectList

next

public GenericObject next(ListIterator li)
Description copied from class: GenericObjectList
Traverse the list given a list iterator

Overrides:
next in class GenericObjectList

encode

public String encode()
Description copied from class: GenericObjectList
Encode the list in semicolon separated form.

Overrides:
encode in class GenericObjectList
Returns:
an encoded string containing the objects in this list.

toString

public String toString()
Description copied from class: GenericObjectList
Alias for the encode function above.

Overrides:
toString in class GenericObjectList

replace

public void replace(String objectText,
                    GenericObject replacementObject,
                    boolean matchSubstring)
             throws IllegalArgumentException
Do a find and replace of objects in this list.

Overrides:
replace in class GenericObjectList
Parameters:
objectText - text of the object to find.
replacementObject - object to replace the target with ( in case a target is found).
matchSubstring - boolean that indicates whether to flag a match when objectText is a substring of a candidate object's encoded text.
Throws:
IllegalArgumentException

replace

public void replace(String objectText,
                    GenericObjectList replacementObject,
                    boolean matchSubstring)
             throws IllegalArgumentException
Do a find and replace of objects in this list.

Overrides:
replace in class GenericObjectList
Parameters:
objectText - text of the object to find.
replacementObject - object to replace the target with (in case a target is found).
matchSubstring - boolean that indicates whether to flag a match when objectText is a substring of a candidate object's encoded text.
Throws:
IllegalArgumentException
Since:
v1.0


Copyright © 2013 LittleShoot. All Rights Reserved.