Пример #1
0
 public void Print(object o)
 {
     lock (line)
     {
         Print(JavaSystem.Str(o));
     }
 }
Пример #2
0
 public void Print(bool b)
 {
     lock (line)
     {
         line.Append(JavaSystem.Str(b));
     }
 }
Пример #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));
            }
        }
Пример #4
0
 public void Print(double d)
 {
     lock (line)
     {
         line.Append(JavaSystem.Str(d));
     }
 }
Пример #5
0
 public StringBuffer Append(double d)
 {
     lock (content)
     {
         content.Append(JavaSystem.Str(d));
     }
     return(this);
 }
Пример #6
0
 public StringBuffer Append(object o)
 {
     lock (content)
     {
         content.Append(JavaSystem.Str(o));
     }
     return(this);
 }
Пример #7
0
 public void Println(bool b)
 {
     lock (line)
     {
         line.Append(JavaSystem.Str(b));
         FinishLine();
     }
 }
Пример #8
0
 public void Println(object o)
 {
     lock (line)
     {
         line.Append(JavaSystem.Str(o));
         FinishLine();
     }
 }
Пример #9
0
 public StringBuffer Append(bool b)
 {
     lock (content)
     {
         content.Append(JavaSystem.Str(b));
     }
     return(this);
 }
Пример #10
0
 public void Println(double d)
 {
     lock (line)
     {
         line.Append(JavaSystem.Str(d));
         FinishLine();
     }
 }
Пример #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());
        }
Пример #12
0
 public static string ValueOf(char c)
 {
     return(JavaSystem.Str(c));
 }
Пример #13
0
 public static string ValueOf(bool b)
 {
     return(JavaSystem.Str(b));
 }
Пример #14
0
 public override string ToString()
 {
     return(JavaSystem.Str(value));
 }
Пример #15
0
 public static string ToString(float d)
 {
     return(JavaSystem.Str(d));
 }
Пример #16
0
 public static int ToUpperCase(int ch)
 {
     return((int)JavaSystem.Str(ch).ToUpper().CharAt(0));
 }
Пример #17
0
 public static char ToUpperCase(char ch)
 {
     return(JavaSystem.Str(ch).ToUpper().CharAt(0));
 }
Пример #18
0
 public static string ValueOf(int i)
 {
     return(JavaSystem.Str(i));
 }
Пример #19
0
 public static string ToString(double d)
 {
     return(JavaSystem.Str(d));
 }
Пример #20
0
 public StringBuilder Append(double d)
 {
     content.Append(JavaSystem.Str(d));
     return(this);
 }
Пример #21
0
 public StringBuilder Append(bool b)
 {
     content.Append(JavaSystem.Str(b));
     return(this);
 }
Пример #22
0
 public StringBuilder Append(object o)
 {
     content.Append(JavaSystem.Str(o));
     return(this);
 }
Пример #23
0
 public static string ValueOf(object o)
 {
     return(JavaSystem.Str(o));
 }
Пример #24
0
 public void Println(object o)
 {
     Println(JavaSystem.Str(o));
 }
Пример #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));
 }
Пример #26
0
 public static string ToString(bool b)
 {
     return(JavaSystem.Str(b));
 }
Пример #27
0
 public static string ValueOf(double d)
 {
     return(JavaSystem.Str(d));
 }