io.undertow.util

## Class HeaderValues

- java.lang.Object
- - java.util.AbstractCollection<String>
  - - io.undertow.util.HeaderValues

All Implemented Interfaces:
  Iterable<String>, Collection<String>, Deque<String>, List<String>, Queue<String>, RandomAccess

    public final class HeaderValues
    extends AbstractCollection<String>
    implements Deque<String>, List<String>, RandomAccess

An array-backed list/deque for header string values.

Author:
  David M. Lloyd

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `add(int index, String s)`
`boolean` `add(String s)`
`boolean` `addAll(Collection<? extends String> c)`
`boolean` `addAll(int index, Collection<? extends String> c)`
`void` `addFirst(String s)`
`void` `addLast(String s)`
`void` `clear()`
`boolean` `contains(Object o)`
`Iterator<String>` `descendingIterator()`
`String` `element()`
`String` `get(int idx)`
`String` `getFirst()`
`HttpString` `getHeaderName()`
`String` `getLast()`
`int` `indexOf(Object o)`
`boolean` `isEmpty()`
`Iterator<String>` `iterator()`
`int` `lastIndexOf(Object o)`
`ListIterator<String>` `listIterator()`
`ListIterator<String>` `listIterator(int index)`
`boolean` `offer(String s)`
`boolean` `offerFirst(String headerValue)`
`boolean` `offerLast(String headerValue)`
`String` `peek()`
`String` `peekFirst()`
`String` `peekLast()`
`String` `poll()`
`String` `pollFirst()`
`String` `pollLast()`
`String` `pop()`
`void` `push(String s)`
`String` `remove()`
`String` `remove(int idx)`
`boolean` `remove(Object obj)`
`String` `removeFirst()`
`boolean` `removeFirstOccurrence(Object o)`
`String` `removeLast()`
`boolean` `removeLastOccurrence(Object o)`
`String` `set(int index, String element)`
`int` `size()`
`List<String>` `subList(int fromIndex, int toIndex)`
`String[]` `toArray()`
`<T> T[]` `toArray(T[] a)`

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

`containsAll, removeAll, retainAll, toString`

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

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

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

`containsAll, equals, hashCode, parallelStream, removeAll, removeIf, retainAll, spliterator, stream`

### Methods inherited from interface java.lang.Iterable

`forEach`

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

`containsAll, equals, hashCode, removeAll, replaceAll, retainAll, sort, spliterator`

### Method Detail

#### getHeaderName

    public HttpString getHeaderName()

#### size

    public int size()

Specified by:
  `size` in interface `Collection<String>`
Specified by:
  `size` in interface `Deque<String>`
Specified by:
  `size` in interface `List<String>`
Specified by:
  `size` in class `AbstractCollection<String>`

#### isEmpty

    public boolean isEmpty()

Specified by:
  `isEmpty` in interface `Collection<String>`
Specified by:
  `isEmpty` in interface `List<String>`
Overrides:
  `isEmpty` in class `AbstractCollection<String>`

#### clear

    public void clear()

Specified by:
  `clear` in interface `Collection<String>`
Specified by:
  `clear` in interface `List<String>`
Overrides:
  `clear` in class `AbstractCollection<String>`

#### listIterator

    public ListIterator<String> listIterator()

Specified by:
  `listIterator` in interface `List<String>`

#### listIterator

    public ListIterator<String> listIterator(int index)

Specified by:
  `listIterator` in interface `List<String>`

#### iterator

    public Iterator<String> iterator()

Specified by:
  `iterator` in interface `Iterable<String>`
Specified by:
  `iterator` in interface `Collection<String>`
Specified by:
  `iterator` in interface `Deque<String>`
Specified by:
  `iterator` in interface `List<String>`
Specified by:
  `iterator` in class `AbstractCollection<String>`

#### descendingIterator

    public Iterator<String> descendingIterator()

Specified by:
  `descendingIterator` in interface `Deque<String>`

#### offerFirst

    public boolean offerFirst(String headerValue)

Specified by:
  `offerFirst` in interface `Deque<String>`

#### offerLast

    public boolean offerLast(String headerValue)

Specified by:
  `offerLast` in interface `Deque<String>`

#### pollFirst

    public String pollFirst()

Specified by:
  `pollFirst` in interface `Deque<String>`

#### pollLast

    public String pollLast()

Specified by:
  `pollLast` in interface `Deque<String>`

#### remove

    public String remove(int idx)

Specified by:
  `remove` in interface `List<String>`

#### get

    public String get(int idx)

Specified by:
  `get` in interface `List<String>`

#### indexOf

    public int indexOf(Object o)

Specified by:
  `indexOf` in interface `List<String>`

#### lastIndexOf

    public int lastIndexOf(Object o)

Specified by:
  `lastIndexOf` in interface `List<String>`

#### set

    public String set(int index,
                      String element)

Specified by:
  `set` in interface `List<String>`

#### addAll

    public boolean addAll(int index,
                          Collection<? extends String> c)

Specified by:
  `addAll` in interface `List<String>`

#### subList

    public List<String> subList(int fromIndex,
                                int toIndex)

Specified by:
  `subList` in interface `List<String>`

#### toArray

    public String[] toArray()

Specified by:
  `toArray` in interface `Collection<String>`
Specified by:
  `toArray` in interface `List<String>`
Overrides:
  `toArray` in class `AbstractCollection<String>`

#### toArray

    public <T> T[] toArray(T[] a)

Specified by:
  `toArray` in interface `Collection<String>`
Specified by:
  `toArray` in interface `List<String>`
Overrides:
  `toArray` in class `AbstractCollection<String>`

#### addFirst

    public void addFirst(String s)

Specified by:
  `addFirst` in interface `Deque<String>`

#### addLast

    public void addLast(String s)

Specified by:
  `addLast` in interface `Deque<String>`

#### add

    public void add(int index,
                    String s)

Specified by:
  `add` in interface `List<String>`

#### contains

    public boolean contains(Object o)

Specified by:
  `contains` in interface `Collection<String>`
Specified by:
  `contains` in interface `Deque<String>`
Specified by:
  `contains` in interface `List<String>`
Overrides:
  `contains` in class `AbstractCollection<String>`

#### peekFirst

    public String peekFirst()

Specified by:
  `peekFirst` in interface `Deque<String>`

#### peekLast

    public String peekLast()

Specified by:
  `peekLast` in interface `Deque<String>`

#### removeFirstOccurrence

    public boolean removeFirstOccurrence(Object o)

Specified by:
  `removeFirstOccurrence` in interface `Deque<String>`

#### removeLastOccurrence

    public boolean removeLastOccurrence(Object o)

Specified by:
  `removeLastOccurrence` in interface `Deque<String>`

#### add

    public boolean add(String s)

Specified by:
  `add` in interface `Collection<String>`
Specified by:
  `add` in interface `Deque<String>`
Specified by:
  `add` in interface `List<String>`
Specified by:
  `add` in interface `Queue<String>`
Overrides:
  `add` in class `AbstractCollection<String>`

#### push

    public void push(String s)

Specified by:
  `push` in interface `Deque<String>`

#### pop

    public String pop()

Specified by:
  `pop` in interface `Deque<String>`

#### offer

    public boolean offer(String s)

Specified by:
  `offer` in interface `Deque<String>`
Specified by:
  `offer` in interface `Queue<String>`

#### poll

    public String poll()

Specified by:
  `poll` in interface `Deque<String>`
Specified by:
  `poll` in interface `Queue<String>`

#### peek

    public String peek()

Specified by:
  `peek` in interface `Deque<String>`
Specified by:
  `peek` in interface `Queue<String>`

#### remove

    public String remove()

Specified by:
  `remove` in interface `Deque<String>`
Specified by:
  `remove` in interface `Queue<String>`

#### removeFirst

    public String removeFirst()

Specified by:
  `removeFirst` in interface `Deque<String>`

#### removeLast

    public String removeLast()

Specified by:
  `removeLast` in interface `Deque<String>`

#### getFirst

    public String getFirst()

Specified by:
  `getFirst` in interface `Deque<String>`

#### getLast

    public String getLast()

Specified by:
  `getLast` in interface `Deque<String>`

#### element

    public String element()

Specified by:
  `element` in interface `Deque<String>`
Specified by:
  `element` in interface `Queue<String>`

#### remove

    public boolean remove(Object obj)

Specified by:
  `remove` in interface `Collection<String>`
Specified by:
  `remove` in interface `Deque<String>`
Specified by:
  `remove` in interface `List<String>`
Overrides:
  `remove` in class `AbstractCollection<String>`

#### addAll

    public boolean addAll(Collection<? extends String> c)

Specified by:
  `addAll` in interface `Collection<String>`
Specified by:
  `addAll` in interface `List<String>`
Overrides:
  `addAll` in class `AbstractCollection<String>`