public static void setRandom(global::java.util.Random par0)
 {
     global::net.sf.jni4net.jni.JNIEnv @__env = global::net.sf.jni4net.jni.JNIEnv.ThreadEnv;
     using (new global::net.sf.jni4net.jni.LocalFrame(@__env, 12)){
         @__env.CallStaticVoidMethod(global::robocode.control.RandomFactory.staticClass, global::robocode.control.RandomFactory.j4n_setRandom2, global::net.sf.jni4net.utils.Convertor.ParStrongCp2J(par0));
     }
 }
Пример #2
0
public void @this(global::com.codename1.ui.BrowserComponent n1){
//XMLVM_BEGIN_WRAPPER[com.codename1.javascript.JavascriptContext: void <init>(com.codename1.ui.BrowserComponent)]
    global::org.xmlvm._nElement _r0;
    global::System.Object _r0_o = null;
    global::org.xmlvm._nElement _r1;
    global::System.Object _r1_o = null;
    global::org.xmlvm._nElement _r2;
    global::System.Object _r2_o = null;
    global::org.xmlvm._nElement _r3;
    global::System.Object _r3_o = null;
    global::org.xmlvm._nElement _r4;
    global::System.Object _r4_o = null;
    global::org.xmlvm._nElement _r5;
    global::System.Object _r5_o = null;
    global::org.xmlvm._nExceptionAdapter _ex = null;
    _r4_o = this;
    _r5_o = n1;
    _r3_o = null;
    ((global::java.lang.Object) _r4_o).@this();
    _r0.i = 0;
    ((global::com.codename1.javascript.JavascriptContext) _r4_o)._fobjectId = _r0.i;
    _r0_o = new global::java.util.Hashtable();
    ((global::java.util.Hashtable) _r0_o).@this();
    ((global::com.codename1.javascript.JavascriptContext) _r4_o)._fcallbacks = (global::java.util.Hashtable) _r0_o;
    _r0_o = new global::java.util.HashMap();
    ((global::java.util.HashMap) _r0_o).@this();
    ((global::com.codename1.javascript.JavascriptContext) _r4_o)._fobjectMap = (global::java.util.HashMap) _r0_o;
    _r0.i = 500;
    ((global::com.codename1.javascript.JavascriptContext) _r4_o)._fobjectMapThresholdSize = _r0.i;
    _r0_o = new global::java.util.Random();
    ((global::java.util.Random) _r0_o).@this();
    ((global::com.codename1.javascript.JavascriptContext) _r4_o)._fcleanupRandomizer = (global::java.util.Random) _r0_o;
    _r0.d = 0.1D;
    ((global::com.codename1.javascript.JavascriptContext) _r4_o)._fcleanupProbability = _r0.d;
    _r0_o = new global::java.lang.StringBuilder();
    ((global::java.lang.StringBuilder) _r0_o).@this();
    // Value=ca_weblite_codename1_js_JavascriptContext_LOOKUP_TABLE
    _r1_o = new global::java.lang.String();
    ((global::java.lang.String)_r1_o).@this(new global::org.xmlvm._nArrayAdapter<char>(new char[] {unchecked((char) unchecked((uint)99)), unchecked((char) unchecked((uint) 97)), unchecked((char) unchecked((uint) 95)), unchecked((char) unchecked((uint) 119)), unchecked((char) unchecked((uint) 101)), unchecked((char) unchecked((uint) 98)), unchecked((char) unchecked((uint) 108)), unchecked((char) unchecked((uint) 105)), unchecked((char) unchecked((uint) 116)), unchecked((char) unchecked((uint) 101)), unchecked((char) unchecked((uint) 95)), unchecked((char) unchecked((uint) 99)), unchecked((char) unchecked((uint) 111)), unchecked((char) unchecked((uint) 100)), unchecked((char) unchecked((uint) 101)), unchecked((char) unchecked((uint) 110)), unchecked((char) unchecked((uint) 97)), unchecked((char) unchecked((uint) 109)), unchecked((char) unchecked((uint) 101)), unchecked((char) unchecked((uint) 49)), unchecked((char) unchecked((uint) 95)), unchecked((char) unchecked((uint) 106)), unchecked((char) unchecked((uint) 115)), unchecked((char) unchecked((uint) 95)), unchecked((char) unchecked((uint) 74)), unchecked((char) unchecked((uint) 97)), unchecked((char) unchecked((uint) 118)), unchecked((char) unchecked((uint) 97)), unchecked((char) unchecked((uint) 115)), unchecked((char) unchecked((uint) 99)), unchecked((char) unchecked((uint) 114)), unchecked((char) unchecked((uint) 105)), unchecked((char) unchecked((uint) 112)), unchecked((char) unchecked((uint) 116)), unchecked((char) unchecked((uint) 67)), unchecked((char) unchecked((uint) 111)), unchecked((char) unchecked((uint) 110)), unchecked((char) unchecked((uint) 116)), unchecked((char) unchecked((uint) 101)), unchecked((char) unchecked((uint) 120)), unchecked((char) unchecked((uint) 116)), unchecked((char) unchecked((uint) 95)), unchecked((char) unchecked((uint) 76)), unchecked((char) unchecked((uint) 79)), unchecked((char) unchecked((uint) 79)), unchecked((char) unchecked((uint) 75)), unchecked((char) unchecked((uint) 85)), unchecked((char) unchecked((uint) 80)), unchecked((char) unchecked((uint) 95)), unchecked((char) unchecked((uint) 84)), unchecked((char) unchecked((uint) 65)), unchecked((char) unchecked((uint) 66)), unchecked((char) unchecked((uint) 76)), unchecked((char) unchecked((uint) 69))}));
    _r0_o = ((global::java.lang.StringBuilder) _r0_o).append((global::java.lang.String) _r1_o);
    _r1.i = global::com.codename1.javascript.JavascriptContext._fcontextId;
    _r2.i = _r1.i + 1;
    global::com.codename1.javascript.JavascriptContext._fcontextId = _r2.i;
    _r0_o = ((global::java.lang.StringBuilder) _r0_o).append((int) _r1.i);
    _r0_o = ((global::java.lang.StringBuilder) _r0_o).toString();
    ((global::com.codename1.javascript.JavascriptContext) _r4_o)._fjsLookupTable = (global::java.lang.String) _r0_o;
    _r0_o = new global::com.codename1.javascript.JavascriptContext_2NavigationCallback();
    ((global::com.codename1.javascript.JavascriptContext_2NavigationCallback) _r0_o).@this((global::com.codename1.javascript.JavascriptContext) _r4_o, (global::com.codename1.javascript.JavascriptContext_21) _r3_o);
    ((global::com.codename1.javascript.JavascriptContext) _r4_o)._fbrowserNavigationCallback = (global::com.codename1.ui.events.BrowserNavigationCallback) _r0_o;
    _r0_o = new global::com.codename1.javascript.JavascriptContext_2ScriptMessageListener();
    ((global::com.codename1.javascript.JavascriptContext_2ScriptMessageListener) _r0_o).@this((global::com.codename1.javascript.JavascriptContext) _r4_o, (global::com.codename1.javascript.JavascriptContext_21) _r3_o);
    ((global::com.codename1.javascript.JavascriptContext) _r4_o)._fscriptMessageListener = (global::com.codename1.ui.events.ActionListener) _r0_o;
    ((global::com.codename1.javascript.JavascriptContext) _r4_o).setBrowserComponent((global::com.codename1.ui.BrowserComponent) _r5_o);
    return;
//XMLVM_END_WRAPPER[com.codename1.javascript.JavascriptContext: void <init>(com.codename1.ui.BrowserComponent)]
}
Пример #3
0
public static double random(){
//XMLVM_BEGIN_WRAPPER[java.lang.Math: double random()]
    global::org.xmlvm._nElement _r0;
    global::System.Object _r0_o = null;
    _r0_o = global::java.lang.Math._frandom;
    if (_r0_o != null) goto label11;
    _r0_o = new global::java.util.Random();
    ((global::java.util.Random) _r0_o).@this();
    global::java.lang.Math._frandom = (global::java.util.Random) _r0_o;
    label11:;
    _r0_o = global::java.lang.Math._frandom;
    _r0.d = ((global::java.util.Random) _r0_o).nextDouble();
    return _r0.d;
//XMLVM_END_WRAPPER[java.lang.Math: double random()]
}
Пример #4
0
private static bool millerRabin(global::java.math.BigInteger n1, int n2){
//XMLVM_BEGIN_WRAPPER[java.math.Primality: boolean millerRabin(java.math.BigInteger, int)]
    global::org.xmlvm._nElement _r0;
    global::System.Object _r0_o = null;
    global::org.xmlvm._nElement _r1;
    global::org.xmlvm._nElement _r2;
    global::System.Object _r3_o = null;
    global::System.Object _r4_o = null;
    global::org.xmlvm._nElement _r5;
    global::org.xmlvm._nElement _r6;
    global::System.Object _r6_o = null;
    global::org.xmlvm._nElement _r7;
    global::System.Object _r7_o = null;
    global::org.xmlvm._nElement _r8;
    global::org.xmlvm._nElement _r9;
    global::org.xmlvm._nElement _r10;
    global::System.Object _r11_o = null;
    global::org.xmlvm._nElement _r12;
    _r11_o = n1;
    _r12.i = n2;
    _r10.i = 1;
    _r9.i = 0;
    _r0_o = global::java.math.BigInteger._fONE;
    _r0_o = ((global::java.math.BigInteger) _r11_o).subtract((global::java.math.BigInteger) _r0_o);
    _r1.i = ((global::java.math.BigInteger) _r0_o).bitLength();
    _r2.i = ((global::java.math.BigInteger) _r0_o).getLowestSetBit();
    _r3_o = ((global::java.math.BigInteger) _r0_o).shiftRight((int) _r2.i);
    _r4_o = new global::java.util.Random();
    ((global::java.util.Random) _r4_o).@this();
    _r5.i = _r9.i;
    label26:;
    if (_r5.i < _r12.i) goto label30;
    _r0.i = _r10.i;
    label29:;
    return _r0.i!=0;
    label30:;
    _r6_o = global::java.math.Primality._fprimes;
    _r6.i = ((global::org.xmlvm._nIArray) _r6_o).Length;
    if (_r5.i >= _r6.i) goto label58;
    _r6_o = global::java.math.Primality._fBIprimes;
    _r6_o = ((global::org.xmlvm._nArrayAdapter<global::System.Object>) _r6_o)[_r5.i];
    label39:;
    _r6_o = ((global::java.math.BigInteger) _r6_o).modPow((global::java.math.BigInteger) _r3_o, (global::java.math.BigInteger) _r11_o);
    _r7.i = ((global::java.math.BigInteger) _r6_o).isOne() ? 1 : 0;
    if (_r7.i != 0) goto label55;
    _r7.i = ((global::java.math.BigInteger) _r6_o).equals((global::java.lang.Object) _r0_o) ? 1 : 0;
    if (_r7.i == 0) goto label80;
    label55:;
    _r5.i = _r5.i + 1;
    goto label26;
    label58:;
    _r6_o = new global::java.math.BigInteger();
    ((global::java.math.BigInteger) _r6_o).@this((int) _r1.i, (global::java.util.Random) _r4_o);
    _r7.i = ((global::java.math.BigInteger) _r6_o).compareTo((global::java.math.BigInteger) _r11_o);
    if (_r7.i >= 0) goto label58;
    _r7.i = ((global::java.math.BigInteger) _r6_o)._fsign;
    if (_r7.i == 0) goto label58;
    _r7.i = ((global::java.math.BigInteger) _r6_o).isOne() ? 1 : 0;
    if (_r7.i != 0) goto label58;
    goto label39;
    label80:;
    _r7_o = _r6_o;
    _r6.i = _r10.i;
    label82:;
    if (_r6.i < _r2.i) goto label92;
    _r6.i = ((global::java.math.BigInteger) _r7_o).equals((global::java.lang.Object) _r0_o) ? 1 : 0;
    if (_r6.i != 0) goto label55;
    _r0.i = _r9.i;
    goto label29;
    label92:;
    _r8.i = ((global::java.math.BigInteger) _r7_o).equals((global::java.lang.Object) _r0_o) ? 1 : 0;
    if (_r8.i == 0) goto label101;
    label98:;
    _r6.i = _r6.i + 1;
    goto label82;
    label101:;
    _r7_o = ((global::java.math.BigInteger) _r7_o).multiply((global::java.math.BigInteger) _r7_o);
    _r7_o = ((global::java.math.BigInteger) _r7_o).mod((global::java.math.BigInteger) _r11_o);
    _r8.i = ((global::java.math.BigInteger) _r7_o).isOne() ? 1 : 0;
    if (_r8.i == 0) goto label98;
    _r0.i = _r9.i;
    goto label29;
//XMLVM_END_WRAPPER[java.math.Primality: boolean millerRabin(java.math.BigInteger, int)]
}
Пример #5
0
 public static BigInteger probablePrime(int prm1, global::java.util.Random prm2)
 {
     return(default(BigInteger));
 }
Пример #6
0
 public BigInteger(int prm1, int prm2, global::java.util.Random prm3)
 {
 }
Пример #7
0
private static bool millerRabin(global::com.codename1.util.TBigInteger n1, int n2){
//XMLVM_BEGIN_WRAPPER[com.codename1.util.TPrimality: boolean millerRabin(com.codename1.util.TBigInteger, int)]
    global::org.xmlvm._nElement _r0;
    global::System.Object _r0_o = null;
    global::org.xmlvm._nElement _r1;
    global::System.Object _r1_o = null;
    global::org.xmlvm._nElement _r2;
    global::System.Object _r2_o = null;
    global::org.xmlvm._nElement _r3;
    global::System.Object _r3_o = null;
    global::org.xmlvm._nElement _r4;
    global::System.Object _r4_o = null;
    global::org.xmlvm._nElement _r5;
    global::System.Object _r5_o = null;
    global::org.xmlvm._nElement _r6;
    global::System.Object _r6_o = null;
    global::org.xmlvm._nElement _r7;
    global::System.Object _r7_o = null;
    global::org.xmlvm._nElement _r8;
    global::System.Object _r8_o = null;
    global::org.xmlvm._nElement _r9;
    global::System.Object _r9_o = null;
    global::org.xmlvm._nElement _r10;
    global::System.Object _r10_o = null;
    global::org.xmlvm._nElement _r11;
    global::System.Object _r11_o = null;
    global::org.xmlvm._nElement _r12;
    global::System.Object _r12_o = null;
    global::org.xmlvm._nExceptionAdapter _ex = null;
    _r11_o = n1;
    _r12.i = n2;
    _r10.i = 0;
    _r9_o = global::com.codename1.util.TBigInteger._fONE;
    _r4_o = ((global::com.codename1.util.TBigInteger) _r11_o).subtract((global::com.codename1.util.TBigInteger) _r9_o);
    _r0.i = ((global::com.codename1.util.TBigInteger) _r4_o).bitLength();
    _r3.i = ((global::com.codename1.util.TBigInteger) _r4_o).getLowestSetBit();
    _r5_o = ((global::com.codename1.util.TBigInteger) _r4_o).shiftRight((int) _r3.i);
    _r6_o = new global::java.util.Random();
    ((global::java.util.Random) _r6_o).@this();
    _r1.i = 0;
    label25:;
    if (_r1.i >= _r12.i) goto label113;
    _r9_o = global::com.codename1.util.TPrimality._fprimes;
    _r9.i = ((global::org.xmlvm._nIArray) _r9_o).Length;
    if (_r1.i >= _r9.i) goto label55;
    _r9_o = global::com.codename1.util.TPrimality._fBIprimes;
    _r7_o = ((global::org.xmlvm._nArrayAdapter<global::System.Object>) _r9_o)[_r1.i];
    label36:;
    _r8_o = ((global::com.codename1.util.TBigInteger) _r7_o).modPow((global::com.codename1.util.TBigInteger) _r5_o, (global::com.codename1.util.TBigInteger) _r11_o);
    _r9.i = ((global::com.codename1.util.TBigInteger) _r8_o).isOne() ? 1 : 0;
    if (_r9.i != 0) goto label52;
    _r9.i = ((global::com.codename1.util.TBigInteger) _r8_o).equals((global::java.lang.Object) _r4_o) ? 1 : 0;
    if (_r9.i == 0) goto label77;
    label52:;
    _r1.i = _r1.i + 1;
    goto label25;
    label55:;
    _r7_o = new global::com.codename1.util.TBigInteger();
    ((global::com.codename1.util.TBigInteger) _r7_o).@this((int) _r0.i, (global::java.util.Random) _r6_o);
    _r9.i = ((global::com.codename1.util.TBigInteger) _r7_o).compareTo((global::com.codename1.util.TBigInteger) _r11_o);
    if (_r9.i >= 0) goto label55;
    _r9.i = ((global::com.codename1.util.TBigInteger) _r7_o)._fsign;
    if (_r9.i == 0) goto label55;
    _r9.i = ((global::com.codename1.util.TBigInteger) _r7_o).isOne() ? 1 : 0;
    if (_r9.i != 0) goto label55;
    goto label36;
    label77:;
    _r2.i = 1;
    label78:;
    if (_r2.i >= _r3.i) goto label105;
    _r9.i = ((global::com.codename1.util.TBigInteger) _r8_o).equals((global::java.lang.Object) _r4_o) ? 1 : 0;
    if (_r9.i == 0) goto label89;
    label86:;
    _r2.i = _r2.i + 1;
    goto label78;
    label89:;
    _r9_o = ((global::com.codename1.util.TBigInteger) _r8_o).multiply((global::com.codename1.util.TBigInteger) _r8_o);
    _r8_o = ((global::com.codename1.util.TBigInteger) _r9_o).mod((global::com.codename1.util.TBigInteger) _r11_o);
    _r9.i = ((global::com.codename1.util.TBigInteger) _r8_o).isOne() ? 1 : 0;
    if (_r9.i == 0) goto label86;
    _r9.i = _r10.i;
    label104:;
    return _r9.i!=0;
    label105:;
    _r9.i = ((global::com.codename1.util.TBigInteger) _r8_o).equals((global::java.lang.Object) _r4_o) ? 1 : 0;
    if (_r9.i != 0) goto label52;
    _r9.i = _r10.i;
    goto label104;
    label113:;
    _r9.i = 1;
    goto label104;
//XMLVM_END_WRAPPER[com.codename1.util.TPrimality: boolean millerRabin(com.codename1.util.TBigInteger, int)]
}
Пример #8
0
public static void shuffle(global::java.util.List n1){
//XMLVM_BEGIN_WRAPPER[java.util.Collections: void shuffle(java.util.List)]
    global::System.Object _r0_o = null;
    global::System.Object _r1_o = null;
    _r1_o = n1;
    _r0_o = new global::java.util.Random();
    ((global::java.util.Random) _r0_o).@this();
    global::java.util.Collections.shuffle((global::java.util.List) _r1_o, (global::java.util.Random) _r0_o);
    return;
//XMLVM_END_WRAPPER[java.util.Collections: void shuffle(java.util.List)]
}