com.evolveum.midpoint.util
Class MiscUtil

java.lang.Object
  extended by com.evolveum.midpoint.util.MiscUtil

public class MiscUtil
extends Object

Author:
semancik

Constructor Summary
MiscUtil()
           
 
Method Summary
static Boolean and(Boolean... operands)
          n-ary and that ignores null values.
static Date asDate(XMLGregorianCalendar xgc)
          Converts an XMLGregorianCalendar to an instance of java.util.Date
static XMLGregorianCalendar asXMLGregorianCalendar(Date date)
          Converts a java.util.Date into an instance of XMLGregorianCalendar
static
<T> void
carthesian(Collection<Collection<T>> dimensions, Processor<Collection<T>> processor)
           
static String concat(Collection<String> stringCollection)
           
static void copyFile(File sourceFile, File destFile)
           
static
<T> Collection<T>
createCollection(T... items)
           
static boolean equals(Object a, Object b)
           
static String getValueWithClass(Object object)
           
static boolean isAllNull(Collection<?> collection)
           
static String readFile(File file)
           
static
<T> Collection<T>
union(Collection<T>... sets)
           
static boolean unorderedCollectionEquals(Collection a, Collection b)
           
static boolean unorderedCollectionEquals(Collection a, Collection b, Comparator comparator)
          Only zero vs non-zero value of comparator is important.
static int unorderedCollectionHashcode(Collection collection)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MiscUtil

public MiscUtil()
Method Detail

union

public static <T> Collection<T> union(Collection<T>... sets)

unorderedCollectionEquals

public static boolean unorderedCollectionEquals(Collection a,
                                                Collection b)

unorderedCollectionEquals

public static boolean unorderedCollectionEquals(Collection a,
                                                Collection b,
                                                Comparator comparator)
Only zero vs non-zero value of comparator is important.


unorderedCollectionHashcode

public static int unorderedCollectionHashcode(Collection collection)

readFile

public static String readFile(File file)
                       throws IOException
Throws:
IOException

copyFile

public static void copyFile(File sourceFile,
                            File destFile)
                     throws IOException
Throws:
IOException

createCollection

public static <T> Collection<T> createCollection(T... items)

and

public static Boolean and(Boolean... operands)
n-ary and that ignores null values.


equals

public static boolean equals(Object a,
                             Object b)

asXMLGregorianCalendar

public static XMLGregorianCalendar asXMLGregorianCalendar(Date date)
Converts a java.util.Date into an instance of XMLGregorianCalendar

Parameters:
date - Instance of java.util.Date or a null reference
Returns:
XMLGregorianCalendar instance whose value is based upon the value in the date parameter. If the date parameter is null then this method will simply return null.

asDate

public static Date asDate(XMLGregorianCalendar xgc)
Converts an XMLGregorianCalendar to an instance of java.util.Date

Parameters:
xgc - Instance of XMLGregorianCalendar or a null reference
Returns:
java.util.Date instance whose value is based upon the value in the xgc parameter. If the xgc parameter is null then this method will simply return null.

carthesian

public static <T> void carthesian(Collection<Collection<T>> dimensions,
                                  Processor<Collection<T>> processor)

concat

public static String concat(Collection<String> stringCollection)

isAllNull

public static boolean isAllNull(Collection<?> collection)

getValueWithClass

public static String getValueWithClass(Object object)


Copyright © 2013 evolveum. All Rights Reserved.