Top Description Inners Constructors Methods
org.abego.treelayout.internal.util.java.lang

public Class IterableUtil

extends Object
Class Inheritance
Imports
java.util.Iterator, .List, org.abego.treelayout.internal.util.java.util.IteratorUtil

Util (general purpose) methods dealing with Iterable.
Author
Udo Borkowski ([email protected])

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static <
Type of elements in the list
T
>
Iterable<T>

Returns:

a reverse Iterable of the list
createReverseIterable
(List<T>
 
list
)

Returns an Iterable with an iterator iterating the given list from the end to the start.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

IterableUtilback to summary
public IterableUtil()

Method Detail

createReverseIterableback to summary
public static <T> Iterable<T> createReverseIterable(List<T> list)

Returns an Iterable with an iterator iterating the given list from the end to the start.

I.e. the iterator does the reverse of the List#iterator().

Parameters
<T>
Type of elements in the list
list:List<T>

 

Returns:Iterable<T>

a reverse Iterable of the list

org.abego.treelayout.internal.util.java.lang back to summary

private Class IterableUtil.ReverseIterable<T>

extends Object
implements Iterable<T>
Class Inheritance
  • java.lang.Object
  • org.abego.treelayout.internal.util.java.lang.IterableUtil.ReverseIterable
All Implemented Interfaces
java.lang.Iterable

Field Summary

Modifier and TypeField and Description
private List<T>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Iterator<T>
iterator()

Implements java.lang.Iterable.iterator.

Returns an iterator over elements of type T.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

listback to summary
private List<T> list

Constructor Detail

ReverseIterableback to summary
public ReverseIterable(List<T> list)

Method Detail

iteratorback to summary
public Iterator<T> iterator()

Implements java.lang.Iterable.iterator.

Doc from java.lang.Iterable.iterator.

Returns an iterator over elements of type T.

Returns:Iterator<T>

an Iterator.

Annotations
@Override