Diamond Control Suite 3.0

diamondedge.util
Class VB

java.lang.Object
  extended by diamondedge.util.VB

public class VB
extends Object


Field Summary
static String copyright
           
 
Constructor Summary
VB()
           
 
Method Summary
static void Assert(boolean expr)
           
static void Assert(double expr)
           
static Variant Choose(int expr, Variant choice1, Variant choice2, Variant choice3)
           
static Variant Choose(int expr, Variant choice1, Variant choice2, Variant choice3, Variant choice4, Variant choice5, Variant choice6, Variant choice7, Variant choice8, Variant choice9, Variant choice10)
           
static Object copyArray(Object arr1, Object arr2)
          Copy a single dimensioned array
static Object copyArray(Object arr1, Object arr2, int nDims)
          Copy a multiple dimensioned array
static double fix(double val)
          returns the integer portion of a number (round to number closest to 0)
static double Fix(double val)
          Deprecated. replaced by fix(double)
static Object[][][][] initArray(Object[][][][] arr, Class cls)
           
static Object[][][] initArray(Object[][][] arr, Class cls)
           
static Object[][] initArray(Object[][] arr, Class cls)
           
static Object[] initArray(Object[] arr, Class cls)
          initialize Variant and UDT arrays
static boolean matches(String str, String pattern)
           
static Variant nz(Variant val)
          If the value of the val argument is Null, the Nz function returns the number zero or a zero-length string, depending on whether the context indicates the value should be a number or a string.
static Variant nz(Variant val, Variant valIfNull)
          If the value of the val argument is Null, the Nz function returns the number zero or a zero-length string, depending on whether the context indicates the value should be a number or a string.
static void randomize()
           
static void randomize(int seed)
           
static double rnd()
          Returns a random number between 0.0 and 1.0.
static double rnd(int num)
           
static int shellExecute(String op, String file, String args, String dir)
           
static String spc(int n)
          Outputs a number of spaces.
static Variant Switch(boolean test1, Variant val1, boolean test2, Variant val2, boolean test3, Variant val3)
           
static Variant Switch(boolean test1, Variant val1, boolean test2, Variant val2, boolean test3, Variant val3, boolean test4, Variant val4, boolean test5, Variant val5, boolean test6, Variant val6, boolean test7, Variant val7)
           
static String tab(int n)
          Outputs a single tab.
static int UBound(Object arr, int dim)
          Deprecated. replaced by upperBound(Object, int)
static int UBound(Variant arr, int dim)
          Deprecated. replaced by upperBound(Variant, int)
static int upperBound(Object arr, int dim)
           
static int upperBound(Variant arr, int dim)
           
static double val(String str)
           
static double Val(String str)
          Deprecated. replaced by val(String)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

copyright

public static final String copyright
See Also:
Constant Field Values
Constructor Detail

VB

public VB()
Method Detail

Choose

public static final Variant Choose(int expr,
                                   Variant choice1,
                                   Variant choice2,
                                   Variant choice3)

Choose

public static final Variant Choose(int expr,
                                   Variant choice1,
                                   Variant choice2,
                                   Variant choice3,
                                   Variant choice4,
                                   Variant choice5,
                                   Variant choice6,
                                   Variant choice7,
                                   Variant choice8,
                                   Variant choice9,
                                   Variant choice10)

Switch

public static final Variant Switch(boolean test1,
                                   Variant val1,
                                   boolean test2,
                                   Variant val2,
                                   boolean test3,
                                   Variant val3)

Switch

public static final Variant Switch(boolean test1,
                                   Variant val1,
                                   boolean test2,
                                   Variant val2,
                                   boolean test3,
                                   Variant val3,
                                   boolean test4,
                                   Variant val4,
                                   boolean test5,
                                   Variant val5,
                                   boolean test6,
                                   Variant val6,
                                   boolean test7,
                                   Variant val7)

Assert

public static final void Assert(boolean expr)
                         throws RuntimeException
Throws:
RuntimeException

Assert

public static final void Assert(double expr)
                         throws RuntimeException
Throws:
RuntimeException

matches

public static boolean matches(String str,
                              String pattern)

nz

public static Variant nz(Variant val,
                         Variant valIfNull)
If the value of the val argument is Null, the Nz function returns the number zero or a zero-length string, depending on whether the context indicates the value should be a number or a string. If the valIfNull argument is included, then the Nz function will return the value specified by that argument if the val argument is Null. If the value of variant isn't Null, then the Nz function returns the value of variant.


nz

public static Variant nz(Variant val)
If the value of the val argument is Null, the Nz function returns the number zero or a zero-length string, depending on whether the context indicates the value should be a number or a string. If the value of variant isn't Null, then the Nz function returns the value of variant.


rnd

public static double rnd()
Returns a random number between 0.0 and 1.0. Random number generators are often referred to as pseudorandom number generators because the numbers produced tend to repeat themselves after a period of time.

Returns:
a pseudorandom double between 0.0 and 1.0.
See Also:
Random.nextDouble()

rnd

public static double rnd(int num)

randomize

public static void randomize()

randomize

public static void randomize(int seed)

fix

public static double fix(double val)
returns the integer portion of a number (round to number closest to 0)


upperBound

public static int upperBound(Variant arr,
                             int dim)

upperBound

public static int upperBound(Object arr,
                             int dim)

spc

public static String spc(int n)
Outputs a number of spaces.


tab

public static String tab(int n)
Outputs a single tab. The argument is ignored


val

public static double val(String str)

copyArray

public static Object copyArray(Object arr1,
                               Object arr2)
Copy a single dimensioned array

Parameters:
arr1 - source array to copy from
arr2 - destination array to copy to

copyArray

public static Object copyArray(Object arr1,
                               Object arr2,
                               int nDims)
Copy a multiple dimensioned array

Parameters:
arr1 - source array to copy from. Must have nDims number of dimensions.
arr2 - destination array to copy to. Must have nDims number of dimensions.
nDims - number of dimensions for both arrays

initArray

public static Object[] initArray(Object[] arr,
                                 Class cls)
initialize Variant and UDT arrays


initArray

public static Object[][] initArray(Object[][] arr,
                                   Class cls)

initArray

public static Object[][][] initArray(Object[][][] arr,
                                     Class cls)

initArray

public static Object[][][][] initArray(Object[][][][] arr,
                                       Class cls)

shellExecute

public static int shellExecute(String op,
                               String file,
                               String args,
                               String dir)
                        throws Exception
Throws:
Exception

Val

public static double Val(String str)
Deprecated. replaced by val(String)


Fix

public static double Fix(double val)
Deprecated. replaced by fix(double)


UBound

public static int UBound(Variant arr,
                         int dim)
Deprecated. replaced by upperBound(Variant, int)


UBound

public static int UBound(Object arr,
                         int dim)
Deprecated. replaced by upperBound(Object, int)


Diamond Control Suite 3.0

Diamond Edge and Diamond Control Suite are trademarks or registered trademarks of Diamond Edge, Inc. Copyright 1999-2005 Diamond Edge, Inc. All Rights Reserved.