public class AudioFormatSet extends ArraySet<AudioFormat>
This class provide convenience methods like
getAudioFormat(AudioFormat) and
matches(AudioFormat).
The contains(Object elem) and get(Object elem)
fail, if elem is not an instance of AudioFormat.
You shouldn't use the ArrayList specific functions like those that take index parameters.
It is not possible to add null elements.
Currently, the methods equals(.,.) and matches(.,.) of class AudioFormats are used. Let's hope that they will be integrated into AudioFormat.
| Modifier and Type | Field and Description |
|---|---|
protected static AudioFormat[] |
EMPTY_FORMAT_ARRAY |
modCount| Constructor and Description |
|---|
AudioFormatSet() |
AudioFormatSet(Collection<AudioFormat> c) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(AudioFormat elem) |
void |
add(int index,
AudioFormat element) |
boolean |
contains(AudioFormat elem) |
AudioFormat |
get(AudioFormat elem) |
AudioFormat |
getAudioFormat(AudioFormat elem) |
AudioFormat |
matches(AudioFormat elem)
Checks whether this Set contains an AudioFormat
that matches
elem. |
AudioFormat |
set(int index,
AudioFormat element) |
AudioFormat[] |
toAudioFormatArray() |
addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, size, sort, spliterator, subList, toArray, toArray, trimToSizeequals, hashCodecontainsAll, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitaddAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, spliterator, toArray, toArrayparallelStream, removeIf, streamcontainsAll, equals, hashCodeprotected static final AudioFormat[] EMPTY_FORMAT_ARRAY
public AudioFormatSet()
public AudioFormatSet(Collection<AudioFormat> c)
public boolean add(AudioFormat elem)
add in interface Collection<AudioFormat>add in interface List<AudioFormat>add in interface Set<AudioFormat>add in class ArraySet<AudioFormat>public boolean contains(AudioFormat elem)
public AudioFormat get(AudioFormat elem)
public AudioFormat getAudioFormat(AudioFormat elem)
public AudioFormat matches(AudioFormat elem)
elem.
The first matching format is returned. If no element
matches elem, null is returned.
public AudioFormat[] toAudioFormatArray()
public void add(int index,
AudioFormat element)
add in interface List<AudioFormat>add in class ArraySet<AudioFormat>public AudioFormat set(int index, AudioFormat element)
set in interface List<AudioFormat>set in class ArraySet<AudioFormat>Copyright © 2016. All Rights Reserved.