com.mindfusion.common
Class Helper

java.lang.Object
  extended by com.mindfusion.common.Helper

public class Helper
extends java.lang.Object

Provides utility methods when translating from C# to Java.


Constructor Summary
Helper()
           
 
Method Summary
static
<_T,_S> _T
as(_S o, java.lang.Class c)
          Performs a try cast of o to class c.
static
<_T> int
getLength(_T[][] array, int dimension)
          Returns the specified dimension of the specified two-dimensional array.
static int getLength(double[][] array, int dimension)
          Returns the specified dimension of the specified two-dimensional array.
static int getLength(float[][] array, int dimension)
          Returns the specified dimension of the specified two-dimensional array.
static int getLength(int[][] array, int dimension)
          Returns the specified dimension of the specified two-dimensional array.
static int getLength(short[][] array, int dimension)
          Returns the specified dimension of the specified two-dimensional array.
static
<_T,_S1,_S2>
_T
nc(_S1 s1, _S2 s2)
          Performs a null-coalescing of the specified arguments.
static
<_L extends java.util.EventListener,_E extends java.util.EventObject>
void
raise(javax.swing.event.EventListenerList listenerList, com.mindfusion.common.event<_L,_E> e, java.lang.Object source, _E args)
          Raises the specified event with the specified argument on the listeners in the specified list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Helper

public Helper()
Method Detail

as

public static <_T,_S> _T as(_S o,
                            java.lang.Class c)
Performs a try cast of o to class c.


nc

public static <_T,_S1,_S2> _T nc(_S1 s1,
                                 _S2 s2)
Performs a null-coalescing of the specified arguments.


raise

public static <_L extends java.util.EventListener,_E extends java.util.EventObject> void raise(javax.swing.event.EventListenerList listenerList,
                                                                                               com.mindfusion.common.event<_L,_E> e,
                                                                                               java.lang.Object source,
                                                                                               _E args)
Raises the specified event with the specified argument on the listeners in the specified list.


getLength

public static <_T> int getLength(_T[][] array,
                                 int dimension)
Returns the specified dimension of the specified two-dimensional array.


getLength

public static int getLength(int[][] array,
                            int dimension)
Returns the specified dimension of the specified two-dimensional array.


getLength

public static int getLength(double[][] array,
                            int dimension)
Returns the specified dimension of the specified two-dimensional array.


getLength

public static int getLength(float[][] array,
                            int dimension)
Returns the specified dimension of the specified two-dimensional array.


getLength

public static int getLength(short[][] array,
                            int dimension)
Returns the specified dimension of the specified two-dimensional array.