Inheritance: global::java.lang.Number, global::java.lang.Comparable
	public static Boolean test(Integer n1, Long n2) {
		if (n1 < n2) {
			return true;
		} else {
			return false;
		}
	}
示例#2
0
        public virtual AbstractStringBuilder append(long l)
        {
            if (l == Long.MIN_VALUE)
            {
                append(new String("-9223372036854775808"));
                return(this);
            }
            int appendedLength = (l < 0) ? Long.stringSize(-l) + 1
                                     : Long.stringSize(l);
            int spaceNeeded = count + appendedLength;

            ensureCapacityInternal(spaceNeeded);
            Long.getChars(l, spaceNeeded, value);
            count = spaceNeeded;
            return(this);
        }
示例#3
0
        public static Long getLong(String nm, Long val)
        {
            throw new NotImplementedException();
//        String v = null;
//        try {
//            v = System.getProperty(nm);
//        } catch (IllegalArgumentException e) {
//        } catch (NullPointerException e) {
//        }
//        if (v != null) {
//            try {
//                return Long.decode(v);
//            } catch (NumberFormatException e) {
//            }
//        }
//        return val;
        }
示例#4
0
 public static Long valueOf(String s, int radix)
 {
     return(Long.valueOf(parseLong(s, radix)));
 }
    public virtual void executeQuery(Connection con, string query)
    {
      Statement statement = (Statement) null;
      ResultSet resultSet = (ResultSet) null;
      ResultSetMetaData metaData;
      int columnCount;
      // ISSUE: fault handler
      try
      {
        statement = con.createStatement();
        resultSet = statement.executeQuery(query);
        metaData = resultSet.getMetaData();
        columnCount = metaData.getColumnCount();
        if (columnCount < 2)
        {
          string str = "JDBCCategoryDataset.executeQuery() : insufficient columns returned from the database.";
          Throwable.__\u003CsuppressFillInStackTrace\u003E();
          throw new SQLException(str);
        }
        else
        {
          int rowCount = this.getRowCount();
          while (true)
          {
            rowCount += -1;
            if (rowCount >= 0)
              this.removeRow(rowCount);
            else
              break;
          }
        }
      }
      __fault
      {
        if (resultSet != null)
        {
          try
          {
            resultSet.close();
            goto label_11;
          }
          catch (Exception exception_12)
          {
            int temp_161 = 2;
            if (ByteCodeHelper.MapException<Exception>(exception_12, (ByteCodeHelper.MapFlags) temp_161) == null)
              throw;
          }
        }
label_11:
        if (statement != null)
        {
          try
          {
            statement.close();
            goto label_16;
          }
          catch (Exception exception_11)
          {
            int temp_157 = 2;
            if (ByteCodeHelper.MapException<Exception>(exception_11, (ByteCodeHelper.MapFlags) temp_157) == null)
              throw;
          }
        }
label_16:;
      }
label_17:
      string @string;
      int num1;
      // ISSUE: fault handler
      try
      {
        if (resultSet.next())
        {
          @string = resultSet.getString(1);
          num1 = 2;
        }
        else
          goto label_81;
      }
      __fault
      {
        if (resultSet != null)
        {
          try
          {
            resultSet.close();
            goto label_24;
          }
          catch (Exception exception_10)
          {
            int temp_149 = 2;
            if (ByteCodeHelper.MapException<Exception>(exception_10, (ByteCodeHelper.MapFlags) temp_149) == null)
              throw;
          }
        }
label_24:
        if (statement != null)
        {
          try
          {
            statement.close();
            goto label_29;
          }
          catch (Exception exception_9)
          {
            int temp_145 = 2;
            if (ByteCodeHelper.MapException<Exception>(exception_9, (ByteCodeHelper.MapFlags) temp_145) == null)
              throw;
          }
        }
label_29:;
      }
      while (true)
      {
        // ISSUE: fault handler
        try
        {
          if (num1 <= columnCount)
          {
            string columnName = metaData.getColumnName(num1);
            int columnType = metaData.getColumnType(num1);
            int num2 = -6;
            if (columnType != num2)
            {
              int num3 = -5;
              if (columnType != num3)
              {
                int num4 = -1;
                if (columnType != num4)
                {
                  int num5 = 1;
                  if (columnType != num5)
                  {
                    int num6 = 2;
                    if (columnType != num6)
                    {
                      int num7 = 3;
                      if (columnType != num7)
                      {
                        int num8 = 4;
                        if (columnType != num8)
                        {
                          int num9 = 5;
                          if (columnType != num9)
                          {
                            int num10 = 6;
                            if (columnType != num10)
                            {
                              int num11 = 7;
                              if (columnType != num11)
                              {
                                int num12 = 8;
                                if (columnType != num12)
                                {
                                  int num13 = 12;
                                  if (columnType != num13)
                                  {
                                    int num14 = 91;
                                    if (columnType != num14)
                                    {
                                      int num15 = 92;
                                      if (columnType != num15)
                                      {
                                        int num16 = 93;
                                        if (columnType != num16)
                                          goto label_69;
                                      }
                                    }
                                    Date date = (Date) resultSet.getObject(num1);
                                    Long.__\u003Cclinit\u003E();
                                    Long @long = new Long(((Date) date).getTime());
                                    if (this.transpose)
                                    {
                                      this.setValue((Number) @long, (IComparable) columnName, (IComparable) @string);
                                      goto label_69;
                                    }
                                    else
                                    {
                                      this.setValue((Number) @long, (IComparable) @string, (IComparable) columnName);
                                      goto label_69;
                                    }
                                  }
                                }
                                else
                                  goto label_46;
                              }
                              else
                                goto label_46;
                            }
                            else
                              goto label_46;
                          }
                          else
                            goto label_46;
                        }
                        else
                          goto label_46;
                      }
                      else
                        goto label_46;
                    }
                    else
                      goto label_46;
                  }
                }
                string str = (string) resultSet.getObject(num1);
                try
                {
                  Double @double = Double.valueOf(str);
                  if (this.transpose)
                  {
                    this.setValue((Number) @double, (IComparable) columnName, (IComparable) @string);
                    goto label_69;
                  }
                  else
                  {
                    this.setValue((Number) @double, (IComparable) @string, (IComparable) columnName);
                    goto label_69;
                  }
                }
                catch (NumberFormatException ex)
                {
                  goto label_68;
                }
              }
            }
label_46:
            Number number = (Number) resultSet.getObject(num1);
            if (this.transpose)
            {
              this.setValue(number, (IComparable) columnName, (IComparable) @string);
              goto label_69;
            }
            else
            {
              this.setValue(number, (IComparable) @string, (IComparable) columnName);
              goto label_69;
            }
          }
          else
            goto label_17;
        }
        __fault
        {
          if (resultSet != null)
          {
            try
            {
              resultSet.close();
              goto label_62;
            }
            catch (Exception exception_7)
            {
              int temp_91 = 2;
              if (ByteCodeHelper.MapException<Exception>(exception_7, (ByteCodeHelper.MapFlags) temp_91) == null)
                throw;
            }
          }
label_62:
          if (statement != null)
          {
            try
            {
              statement.close();
              goto label_67;
            }
            catch (Exception exception_6)
            {
              int temp_87 = 2;
              if (ByteCodeHelper.MapException<Exception>(exception_6, (ByteCodeHelper.MapFlags) temp_87) == null)
                throw;
            }
          }
label_67:;
        }
label_68:
label_69:
        // ISSUE: fault handler
        try
        {
          ++num1;
        }
        __fault
        {
          if (resultSet != null)
          {
            try
            {
              resultSet.close();
              goto label_75;
            }
            catch (Exception exception_5)
            {
              int temp_81 = 2;
              if (ByteCodeHelper.MapException<Exception>(exception_5, (ByteCodeHelper.MapFlags) temp_81) == null)
                throw;
            }
          }
label_75:
          if (statement != null)
          {
            try
            {
              statement.close();
              goto label_80;
            }
            catch (Exception exception_4)
            {
              int temp_77 = 2;
              if (ByteCodeHelper.MapException<Exception>(exception_4, (ByteCodeHelper.MapFlags) temp_77) == null)
                throw;
            }
          }
label_80:;
        }
      }
label_81:
      // ISSUE: fault handler
      try
      {
        this.fireDatasetChanged();
      }
      __fault
      {
        if (resultSet != null)
        {
          try
          {
            resultSet.close();
            goto label_87;
          }
          catch (Exception exception_3)
          {
            int temp_40 = 2;
            if (ByteCodeHelper.MapException<Exception>(exception_3, (ByteCodeHelper.MapFlags) temp_40) == null)
              throw;
          }
        }
label_87:
        if (statement != null)
        {
          try
          {
            statement.close();
            goto label_92;
          }
          catch (Exception exception_2)
          {
            int temp_36 = 2;
            if (ByteCodeHelper.MapException<Exception>(exception_2, (ByteCodeHelper.MapFlags) temp_36) == null)
              throw;
          }
        }
label_92:;
      }
      if (resultSet != null)
      {
        try
        {
          resultSet.close();
          goto label_98;
        }
        catch (Exception ex)
        {
          int num2 = 2;
          if (ByteCodeHelper.MapException<Exception>(ex, (ByteCodeHelper.MapFlags) num2) == null)
            throw;
        }
      }
label_98:
      if (statement == null)
        return;
      try
      {
        statement.close();
      }
      catch (Exception ex)
      {
        int num2 = 2;
        if (ByteCodeHelper.MapException<Exception>(ex, (ByteCodeHelper.MapFlags) num2) == null)
          throw;
      }
    }
 static LongCache()
 {
     for(int i = 0; i < cache.Length; i++)
     cache[i] = new Long(i - 128);
 }
 public int compareTo(Long anotherLong)
 {
     return compare(this.value, anotherLong.value);
 }
 public static Long getLong(String nm, Long val)
 {
     throw new NotImplementedException();
     //        String v = null;
     //        try {
     //            v = System.getProperty(nm);
     //        } catch (IllegalArgumentException e) {
     //        } catch (NullPointerException e) {
     //        }
     //        if (v != null) {
     //            try {
     //                return Long.decode(v);
     //            } catch (NumberFormatException e) {
     //            }
     //        }
     //        return val;
 }
示例#9
0
 /// <summary>
 /// Returns the <code>long</code> value of the system property with the specified name.
 /// </summary>
 public static Long getLong(string nm, Long val)
 {
     return(default(Long));
 }
示例#10
0
 /// <summary>
 /// Returns the <code>long</code> value of the system property with the specified name.
 /// </summary>
 public static Long getLong(string nm, Long val)
 {
     return default(Long);
 }
示例#11
0
 /// <summary>
 /// Compares two <code>Long</code> objects numerically.
 /// </summary>
 public int compareTo(Long anotherLong)
 {
     return default(int);
 }
	public static Long test() {
		field += 2;
		return field;
	}
 public virtual RegularTimePeriod advanceTime()
 {
   RegularTimePeriod regularTimePeriod = this.pointsInTime[this.newestAt].next();
   this.newestAt = this.oldestAt;
   int num1 = 0;
   float num2 = 0.0f;
   if (this.maxValue != null)
     num2 = this.maxValue.floatValue();
   for (int index = 0; index < this.getSeriesCount(); ++index)
   {
     if ((double) this.valueHistory[index].getData(this.oldestAt) == (double) num2)
       num1 = 1;
     if (num1 != 0)
       break;
   }
   if (num1 != 0)
     this.invalidateRangeInfo();
   float num3 = 0.0f;
   for (int index = 0; index < this.getSeriesCount(); ++index)
     this.valueHistory[index].enterData(this.newestAt, num3);
   this.pointsInTime[this.newestAt] = regularTimePeriod;
   ++this.oldestAt;
   if (this.oldestAt >= this.historyCount)
     this.oldestAt = 0;
   long num4 = this.domainStart.longValue();
   Long.__\u003Cclinit\u003E();
   this.domainStart = new Long(num4 + this.deltaTime);
   long num5 = this.domainEnd.longValue();
   Long.__\u003Cclinit\u003E();
   this.domainEnd = new Long(num5 + this.deltaTime);
   this.domainRange = new Range((double) num4, (double) num5);
   this.fireSeriesChanged();
   return regularTimePeriod;
 }
 protected internal virtual void findDomainLimits()
 {
   long firstMillisecond = this.getOldestTime().getFirstMillisecond(this.workingCalendar);
   long num = !this.domainIsPointsInTime ? this.getNewestTime().getLastMillisecond(this.workingCalendar) : this.getNewestTime().getFirstMillisecond(this.workingCalendar);
   this.domainStart = new Long(firstMillisecond);
   this.domainEnd = new Long(num);
   this.domainRange = new Range((double) firstMillisecond, (double) num);
 }
示例#15
0
 public static Long valueOf(String s)
 {
     return(Long.valueOf(parseLong(s, 10)));
 }
	public static long test(Long l) {
		return l;
	}
示例#17
0
        public static Long getLong(String nm, long val)
        {
            Long result = Long.getLong(nm, null);

            return((result == null) ? Long.valueOf(val) : result);
        }
示例#18
0
    public static void set(object arrayObj, int index, object value)
    {
        if (arrayObj == null)
        {
            throw new java.lang.NullPointerException();
        }
        Type type = arrayObj.GetType();

        if (ReflectUtil.IsVector(type) && ClassLoaderWrapper.GetWrapperFromType(type.GetElementType()).IsPrimitive)
        {
            java.lang.Boolean booleanValue = value as java.lang.Boolean;
            if (booleanValue != null)
            {
                setBoolean(arrayObj, index, booleanValue.booleanValue());
                return;
            }
            java.lang.Byte byteValue = value as java.lang.Byte;
            if (byteValue != null)
            {
                setByte(arrayObj, index, byteValue.byteValue());
                return;
            }
            java.lang.Character charValue = value as java.lang.Character;
            if (charValue != null)
            {
                setChar(arrayObj, index, charValue.charValue());
                return;
            }
            java.lang.Short shortValue = value as java.lang.Short;
            if (shortValue != null)
            {
                setShort(arrayObj, index, shortValue.shortValue());
                return;
            }
            java.lang.Integer intValue = value as java.lang.Integer;
            if (intValue != null)
            {
                setInt(arrayObj, index, intValue.intValue());
                return;
            }
            java.lang.Float floatValue = value as java.lang.Float;
            if (floatValue != null)
            {
                setFloat(arrayObj, index, floatValue.floatValue());
                return;
            }
            java.lang.Long longValue = value as java.lang.Long;
            if (longValue != null)
            {
                setLong(arrayObj, index, longValue.longValue());
                return;
            }
            java.lang.Double doubleValue = value as java.lang.Double;
            if (doubleValue != null)
            {
                setDouble(arrayObj, index, doubleValue.doubleValue());
                return;
            }
        }
        try
        {
            CheckArray(arrayObj).SetValue(value, index);
        }
        catch (InvalidCastException)
        {
            throw new java.lang.IllegalArgumentException("argument type mismatch");
        }
        catch (IndexOutOfRangeException)
        {
            throw new java.lang.ArrayIndexOutOfBoundsException();
        }
    }
示例#19
0
 public int compareTo(Long anotherLong)
 {
     return(compare(this.value, anotherLong.value));
 }
示例#20
0
 /// <summary>
 /// Compares two <code>Long</code> objects numerically.
 /// </summary>
 public int compareTo(Long anotherLong)
 {
     return(default(int));
 }