Example #1
0
 public void Print(object o)
 {
     lock (line)
     {
         Print(JavaSystem.Str(o));
     }
 }
Example #2
0
 public void Print(bool b)
 {
     lock (line)
     {
         line.Append(JavaSystem.Str(b));
     }
 }
Example #3
0
        public static string GetUTCTime(long duration, TimeFormat format)
        {
            long h  = GetHours(duration);
            long m  = GetMinutes(duration);
            long s  = GetSeconds(duration);
            long ms = GetMilliSeconds(duration);

            switch (format.GetNumber())
            {
            case TimeFormat.HH_MM_SS:
                return(StringUtils.Format(format.GetFormat(), Zero(h), Zero(m), Zero(s)));

            case TimeFormat.HH_MM_SS_000:
                return(StringUtils.Format(format.GetFormat(), Zero(h), Zero(m), Zero(s), ms));

            case TimeFormat.MM_SS_000:
                return(StringUtils.Format(format.GetFormat(), Zero(m), Zero(s), ms));

            case TimeFormat.MM_SS_0:
                return(StringUtils.Format(format.GetFormat(), Zero(m), Zero(s), ms / 100));

            case TimeFormat.UNDEFINED:
            default:
                return(JavaSystem.Str(ms));
            }
        }
Example #4
0
 public void Print(double d)
 {
     lock (line)
     {
         line.Append(JavaSystem.Str(d));
     }
 }
Example #5
0
 public StringBuffer Append(double d)
 {
     lock (content)
     {
         content.Append(JavaSystem.Str(d));
     }
     return(this);
 }
Example #6
0
 public StringBuffer Append(object o)
 {
     lock (content)
     {
         content.Append(JavaSystem.Str(o));
     }
     return(this);
 }
Example #7
0
 public void Println(bool b)
 {
     lock (line)
     {
         line.Append(JavaSystem.Str(b));
         FinishLine();
     }
 }
Example #8
0
 public void Println(object o)
 {
     lock (line)
     {
         line.Append(JavaSystem.Str(o));
         FinishLine();
     }
 }
Example #9
0
 public StringBuffer Append(bool b)
 {
     lock (content)
     {
         content.Append(JavaSystem.Str(b));
     }
     return(this);
 }
Example #10
0
 public void Println(double d)
 {
     lock (line)
     {
         line.Append(JavaSystem.Str(d));
         FinishLine();
     }
 }
Example #11
0
        public static string Join(object delim, object[] parts)
        {
            string d = JavaSystem.Str(delim);

            System.Text.StringBuilder b = new System.Text.StringBuilder();
            for (int i = 0; i < parts.Length; i++)
            {
                if (i > 0)
                {
                    b.Append(d);
                }
                b.Append(JavaSystem.Str(parts[i]));
            }
            return(b.ToString());
        }
Example #12
0
 public static string ValueOf(char c)
 {
     return(JavaSystem.Str(c));
 }
Example #13
0
 public static string ValueOf(bool b)
 {
     return(JavaSystem.Str(b));
 }
Example #14
0
 public override string ToString()
 {
     return(JavaSystem.Str(value));
 }
Example #15
0
 public static string ToString(float d)
 {
     return(JavaSystem.Str(d));
 }
Example #16
0
 public static int ToUpperCase(int ch)
 {
     return((int)JavaSystem.Str(ch).ToUpper().CharAt(0));
 }
Example #17
0
 public static char ToUpperCase(char ch)
 {
     return(JavaSystem.Str(ch).ToUpper().CharAt(0));
 }
Example #18
0
 public static string ValueOf(int i)
 {
     return(JavaSystem.Str(i));
 }
Example #19
0
 public static string ToString(double d)
 {
     return(JavaSystem.Str(d));
 }
Example #20
0
 public StringBuilder Append(double d)
 {
     content.Append(JavaSystem.Str(d));
     return(this);
 }
Example #21
0
 public StringBuilder Append(bool b)
 {
     content.Append(JavaSystem.Str(b));
     return(this);
 }
Example #22
0
 public StringBuilder Append(object o)
 {
     content.Append(JavaSystem.Str(o));
     return(this);
 }
Example #23
0
 public static string ValueOf(object o)
 {
     return(JavaSystem.Str(o));
 }
Example #24
0
 public void Println(object o)
 {
     Println(JavaSystem.Str(o));
 }
Example #25
0
 public static string ToStr(object o)
 {
     if (o == null)
     {
         return(LSystem.NULL);
     }
     if (o is short s)
     {
         return(JavaSystem.Str(s));
     }
     if (o is uint ui)
     {
         return(JavaSystem.Str(ui));
     }
     if (o is int i)
     {
         return(JavaSystem.Str(i));
     }
     if (o is long l)
     {
         return(JavaSystem.Str(l));
     }
     if (o is ulong ul)
     {
         return(JavaSystem.Str(ul));
     }
     if (o is float f)
     {
         return(JavaSystem.Str(f));
     }
     if (o is double d)
     {
         return(JavaSystem.Str(d));
     }
     if (o is bool b)
     {
         return(JavaSystem.Str(b));
     }
     if (o is CharSequence cs)
     {
         return(cs.ToString());
     }
     if (o is string v)
     {
         if (MathUtils.IsNan(v))
         {
             if (v.IndexOf('.') != -1)
             {
                 return(JavaSystem.Str(Convert.ToDouble(v)));
             }
             else
             {
                 return(JavaSystem.Str(Convert.ToInt32(v)));
             }
         }
         else
         {
             return(v);
         }
     }
     return(Convert.ToString(o));
 }
Example #26
0
 public static string ToString(bool b)
 {
     return(JavaSystem.Str(b));
 }
Example #27
0
 public static string ValueOf(double d)
 {
     return(JavaSystem.Str(d));
 }