Top Inners Constructors Methods
com.sun.faces.util

public Class CollectionsUtils

extends Object
Class Inheritance
Imports
jakarta.faces.model.SelectItem, java.util.Enumeration, .HashMap, .HashSet, .Iterator, .Map, .Set, java.util.stream.Stream

Author
[email protected]

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
public static class

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static <T> T[]
ar(T... ts)

public static <T> T[]
ar()

public static <T> Iterator<T>

Returns:

an unmodifiable Iterator over the passed typed array
asIterator
(T[] items)

public static <T extends SelectItem> Iterator<T>

Returns:

an unmodifiable Iterator over the passed array of SelectItem
asIterator
(T[] items)

public static <T> Set<T>
asSet(T... a)

public static <T, V> CollectionsUtils.ConstMap<T, V>
map()

public static <T> Iterator<T>

Returns:

an Iterator over the passed Enumeration with no remove support
unmodifiableIterator
(Enumeration<T> enumeration)

public static <T> Iterator<T>

Returns:

an Iterator over the passed Iterator with no remove support
unmodifiableIterator
(Iterator<T> iterator)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

CollectionsUtilsback to summary
private CollectionsUtils()

Method Detail

arback to summary
public static <T> T[] ar(T... ts)
Annotations
@SafeVarargs
arback to summary
public static <T> T[] ar()
asIteratorback to summary
public static <T> Iterator<T> asIterator(T[] items)
Returns:Iterator<T>

an unmodifiable Iterator over the passed typed array

asIteratorback to summary
public static <T extends SelectItem> Iterator<T> asIterator(T[] items)
Returns:Iterator<T>

an unmodifiable Iterator over the passed array of SelectItem

asSetback to summary
public static <T> Set<T> asSet(T... a)
Annotations
@SafeVarargs
mapback to summary
public static <T, V> CollectionsUtils.ConstMap<T, V> map()
unmodifiableIteratorback to summary
public static <T> Iterator<T> unmodifiableIterator(Enumeration<T> enumeration)
Returns:Iterator<T>

an Iterator over the passed Enumeration with no remove support

unmodifiableIteratorback to summary
public static <T> Iterator<T> unmodifiableIterator(Iterator<T> iterator)
Returns:Iterator<T>

an Iterator over the passed Iterator with no remove support

com.sun.faces.util back to summary

public Class CollectionsUtils.ConstMap<T, V>

extends HashMap<T, V>
Class Inheritance

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public CollectionsUtils.ConstMap<T, V>
add(T key, V value)

public Map<T, V>
fix()

Inherited from java.util.HashMap:
clearclonecomputecomputeIfAbsentcomputeIfPresentcontainsKeycontainsValueentrySetforEachgetgetOrDefaultisEmptykeySetmergenewHashMapputputAllputIfAbsentremoveremovereplacereplacereplaceAllsizevalues

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.util.HashMap.serialVersionUID.

Constructor Detail

ConstMapback to summary
public ConstMap()

Method Detail

addback to summary
public CollectionsUtils.ConstMap<T, V> add(T key, V value)
fixback to summary
public Map<T, V> fix()
com.sun.faces.util back to summary

public Class CollectionsUtils.UnmodifiableIterator<T>

extends Object
implements Iterator<T>
Class Inheritance
All Implemented Interfaces
java.util.Iterator

Field Summary

Modifier and TypeField and Description
private final Iterator<T>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
hasNext()

Implements java.util.Iterator.hasNext.

Returns true if the iteration has more elements.

public T
next()

Implements java.util.Iterator.next.

Returns the next element in the iteration.

public void
remove()

Overrides default java.util.Iterator.remove.

Removes from the underlying collection the last element returned by this iterator (optional operation).

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

iteratorback to summary
private final Iterator<T> iterator

Constructor Detail

UnmodifiableIteratorback to summary
public UnmodifiableIterator(Iterator<T> iterator)

Method Detail

hasNextback to summary
public boolean hasNext()

Implements java.util.Iterator.hasNext.

Doc from java.util.Iterator.hasNext.

Returns true if the iteration has more elements. (In other words, returns true if next would return an element rather than throwing an exception.)

Returns:boolean

true if the iteration has more elements

Annotations
@Override
nextback to summary
public T next()

Implements java.util.Iterator.next.

Doc from java.util.Iterator.next.

Returns the next element in the iteration.

Returns:T

the next element in the iteration

Annotations
@Override
removeback to summary
public void remove()

Overrides default java.util.Iterator.remove.

Doc from java.util.Iterator.remove.

Removes from the underlying collection the last element returned by this iterator (optional operation). This method can be called only once per call to next.

The behavior of an iterator is unspecified if the underlying collection is modified while the iteration is in progress in any way other than by calling this method, unless an overriding class has specified a concurrent modification policy.

The behavior of an iterator is unspecified if this method is called after a call to the forEachRemaining method.

Annotations
@Override