org.hibernate.envers.tools
Class Tools

java.lang.Object
  extended by org.hibernate.envers.tools.Tools

public class Tools
extends Object

Author:
Adam Warski (adam at warski dot org)

Constructor Summary
Tools()
           
 
Method Summary
static boolean iteratorsContentEqual(Iterator iter1, Iterator iter2)
           
static
<T> List<T>
iteratorToList(Iterator<T> iter)
           
static
<T> List<Pair<Integer,T>>
listToIndexElementPairList(List<T> list)
          Transforms a list of arbitrary elements to a list of index-element pairs.
static
<K,V> Map<K,V>
newHashMap()
           
static
<E> Set<E>
newHashSet()
           
static
<K,V> Map<K,V>
newLinkedHashMap()
           
static boolean objectsEqual(Object obj1, Object obj2)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Tools

public Tools()
Method Detail

newHashMap

public static <K,V> Map<K,V> newHashMap()

newHashSet

public static <E> Set<E> newHashSet()

newLinkedHashMap

public static <K,V> Map<K,V> newLinkedHashMap()

objectsEqual

public static boolean objectsEqual(Object obj1,
                                   Object obj2)

iteratorToList

public static <T> List<T> iteratorToList(Iterator<T> iter)

iteratorsContentEqual

public static boolean iteratorsContentEqual(Iterator iter1,
                                            Iterator iter2)

listToIndexElementPairList

public static <T> List<Pair<Integer,T>> listToIndexElementPairList(List<T> list)
Transforms a list of arbitrary elements to a list of index-element pairs.

Parameters:
list - List to transform.
Returns:
A list of pairs: ((0, element_at_index_0), (1, element_at_index_1), ...)


Copyright © 2008 Hibernate.org. All Rights Reserved.