Package org.apache.cxf.message

# Class MessageContentsList

java.lang.Object
java.util.AbstractCollection<Object>
java.util.AbstractList<Object>
java.util.ArrayList<Object>
org.apache.cxf.message.MessageContentsList

All Implemented Interfaces:
  `Serializable`, `Cloneable`, `Iterable<Object>`, `Collection<Object>`, `List<Object>`, `RandomAccess`, `SequencedCollection<Object>`

public class MessageContentsList extends ArrayList<Object>

See Also:
  - Serialized Form

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final Object`
  `REMOVED_MARKER`
  Indicates that the element of the underlying list is absent.

  ### Fields inherited from class java.util.AbstractList

  `modCount`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `MessageContentsList()`
  `MessageContentsList(Object... values)`
  `MessageContentsList(List<?> values)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Object`
  `get(MessagePartInfo key)`
  `static MessageContentsList`
  `getContentsList(Message msg)`
  `boolean`
  `hasValue(MessagePartInfo key)`
  `Object`
  `put(MessagePartInfo key, Object value)`
  `void`
  `remove(MessagePartInfo key)`
  Marks corresponding element as removed, indicating absent value, so subsequent `get(MessagePartInfo)` for the same key return null.
  `Object`
  `set(int idx, Object value)`

  ### Methods inherited from class java.util.ArrayList

  `add, add, addAll, addAll, addFirst, addLast, clear, clone, contains, ensureCapacity, equals, forEach, get, getFirst, getLast, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeFirst, removeIf, removeLast, removeRange, replaceAll, retainAll, size, sort, spliterator, subList, toArray, toArray, trimToSize`

  ### Methods inherited from class java.util.AbstractCollection

  `containsAll, toString`

  ### Methods inherited from class java.lang.Object

  `finalize, getClass, notify, notifyAll, wait, wait, wait`

  ### Methods inherited from interface java.util.Collection

  `parallelStream, stream, toArray`

  ### Methods inherited from interface java.util.List

  `containsAll, reversed`

- ## Field Details

  - ### REMOVED_MARKER

    public static final Object REMOVED_MARKER
    Indicates that the element of the underlying list is absent. This is necessary for the elements to keep their original indexes within this list when some preceding elements are not populated or deleted.
    See Also:
      - `get(MessagePartInfo)`
      - `remove(MessagePartInfo)`

- ## Constructor Details

  - ### MessageContentsList

    public MessageContentsList()

  - ### MessageContentsList

    public MessageContentsList(Object... values)

  - ### MessageContentsList

    public MessageContentsList(List<?> values)

- ## Method Details

  - ### getContentsList

    public static MessageContentsList getContentsList(Message msg)

  - ### set

    public Object set(int idx, Object value)
    Specified by:
      `set` in interface `List<Object>`
    Overrides:
      `set` in class `ArrayList<Object>`

  - ### put

    public Object put(MessagePartInfo key, Object value)

  - ### hasValue

    public boolean hasValue(MessagePartInfo key)

  - ### get

    public Object get(MessagePartInfo key)
    Parameters:
      `key` - the key whose associated element is to be returned.
    Returns:
      the element to which the index property of the specified key is mapped, or `null` if mapped element is marked as removed.

  - ### remove

    public void remove(MessagePartInfo key)
    Marks corresponding element as removed, indicating absent value, so subsequent `get(MessagePartInfo)` for the same key return null.
    Parameters:
      `key` - the key whose associated element is to be marked as removed.