Top Description Inners Constructors Methods
org.yaml.snakeyaml.util

public Class ArrayUtils

extends Object
Class Inheritance
Imports
java.util.AbstractList, .Collections, .List

Array manipulation

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private static class

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static <
class of the elements in the array
E
>
List<E>

Returns:

List backed by the given arrays
toUnmodifiableCompositeList
(E[]
- the array to extend
array1
,
E[]
- the array to add to the first
array2
)

Returns an unmodifiable List containing the second array appended to the first one.

public static <
class of the elements in the array
E
>
List<E>

Returns:

List backed by the given array
toUnmodifiableList
(E[]
- array to convert
elements
)

Returns an unmodifiable List backed by the given array.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

ArrayUtilsback to summary
private ArrayUtils()

Method Detail

toUnmodifiableCompositeListback to summary
public static <E> List<E> toUnmodifiableCompositeList(E[] array1, E[] array2)

Returns an unmodifiable List containing the second array appended to the first one. The method doesn't copy the arrays, so the changes to the arrays will affect the List as well.

Parameters
<E>
class of the elements in the array
array1:E[]

- the array to extend

array2:E[]

- the array to add to the first

Returns:List<E>

List backed by the given arrays

toUnmodifiableListback to summary
public static <E> List<E> toUnmodifiableList(E[] elements)

Returns an unmodifiable List backed by the given array. The method doesn't copy the array, so the changes to the array will affect the List as well.

Parameters
<E>
class of the elements in the array
elements:E[]

- array to convert

Returns:List<E>

List backed by the given array

org.yaml.snakeyaml.util back to summary

private Class ArrayUtils.CompositeUnmodifiableArrayList<E>

extends AbstractList<E>
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final E[]
private final E[]
Inherited from java.util.AbstractList:
modCount

Constructor Summary

AccessConstructor and Description
pack-priv
CompositeUnmodifiableArrayList(E[] array1, E[] array2)

Method Summary

Modifier and TypeMethod and Description
public E
get(int
index of the element to return
index
)

Implements abstract java.util.AbstractList.get.

Implements java.util.List.get.

Returns the element at the specified position in this list.
public int
size()

Implements abstract java.util.AbstractCollection.size.

Implements java.util.List.size, java.util.Collection.size.

Returns the number of elements in this list.
Inherited from java.util.AbstractList:
addaddaddAllclearequalshashCodeindexOfiteratorlastIndexOflistIteratorlistIteratorremoveremoveRangesetsubList

Field Detail

array1back to summary
private final E[] array1
array2back to summary
private final E[] array2

Constructor Detail

CompositeUnmodifiableArrayListback to summary
pack-priv CompositeUnmodifiableArrayList(E[] array1, E[] array2)

Method Detail

getback to summary
public E get(int index)

Implements abstract java.util.AbstractList.get.

Implements java.util.List.get.

Doc from java.util.AbstractList.get.

Returns the element at the specified position in this list.

Parameters
index:int

Doc from java.util.List.get.

index of the element to return

Returns:E

Doc from java.util.List.get.

the element at the specified position in this list

Annotations
@Override
sizeback to summary
public int size()

Implements abstract java.util.AbstractCollection.size.

Implements java.util.List.size, java.util.Collection.size.

Doc from java.util.List.size.

Returns the number of elements in this list. If this list contains more than Integer.MAX_VALUE elements, returns Integer.MAX_VALUE.

Returns:int

the number of elements in this list

Annotations
@Override
org.yaml.snakeyaml.util back to summary

private Class ArrayUtils.UnmodifiableArrayList<E>

extends AbstractList<E>
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final E[]
Inherited from java.util.AbstractList:
modCount

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public E
get(int
index of the element to return
index
)

Implements abstract java.util.AbstractList.get.

Implements java.util.List.get.

Returns the element at the specified position in this list.
public int
size()

Implements abstract java.util.AbstractCollection.size.

Implements java.util.List.size, java.util.Collection.size.

Returns the number of elements in this list.
Inherited from java.util.AbstractList:
addaddaddAllclearequalshashCodeindexOfiteratorlastIndexOflistIteratorlistIteratorremoveremoveRangesetsubList

Field Detail

arrayback to summary
private final E[] array

Constructor Detail

UnmodifiableArrayListback to summary
pack-priv UnmodifiableArrayList(E[] array)

Method Detail

getback to summary
public E get(int index)

Implements abstract java.util.AbstractList.get.

Implements java.util.List.get.

Doc from java.util.AbstractList.get.

Returns the element at the specified position in this list.

Parameters
index:int

Doc from java.util.List.get.

index of the element to return

Returns:E

Doc from java.util.List.get.

the element at the specified position in this list

Annotations
@Override
sizeback to summary
public int size()

Implements abstract java.util.AbstractCollection.size.

Implements java.util.List.size, java.util.Collection.size.

Doc from java.util.List.size.

Returns the number of elements in this list. If this list contains more than Integer.MAX_VALUE elements, returns Integer.MAX_VALUE.

Returns:int

the number of elements in this list

Annotations
@Override