Examples of longValue()


Examples of java.math.BigInteger.longValue()

        return values.get(index);
      case SUM:
        BigInteger sum = BigInteger.valueOf(0);
        for (int i = 0; i < values.size(); ++i)
          sum = sum.add(BigInteger.valueOf(values.get(i)));
        return sum.longValue();
      case MIN:
        BigInteger minimum = BigInteger.valueOf(values.get(0));
        for (int i = 1; i < values.size(); ++i)
          if (minimum.compareTo(BigInteger.valueOf(
              values.get(i))) > 0)
View Full Code Here

Examples of java.math.BigInteger.longValue()

        BigInteger minimum = BigInteger.valueOf(values.get(0));
        for (int i = 1; i < values.size(); ++i)
          if (minimum.compareTo(BigInteger.valueOf(
              values.get(i))) > 0)
            minimum = BigInteger.valueOf(values.get(i));
        return minimum.longValue();
      case MAX:
        BigInteger maximum = BigInteger.valueOf(values.get(0));
        for (int i = 1; i < values.size(); ++i)
          if (maximum.compareTo(BigInteger.valueOf(
              values.get(i))) < 0)
View Full Code Here

Examples of java.math.BigInteger.longValue()

        BigInteger maximum = BigInteger.valueOf(values.get(0));
        for (int i = 1; i < values.size(); ++i)
          if (maximum.compareTo(BigInteger.valueOf(
              values.get(i))) < 0)
            maximum = BigInteger.valueOf(values.get(i));
        return maximum.longValue();
      case FIRST:
        return values.get(0);
      case LAST:
        return values.get(values.size() - 1);
      default:
View Full Code Here

Examples of java.util.Date.longValue()

      startTime = start.getTime();
    }
    else if (startRaw instanceof Number)
    {
      final Number start = (Number) startRaw;
      startTime = start.longValue();
    }
    else
    {
      return null;
    }
View Full Code Here

Examples of java.util.concurrent.atomic.AtomicInteger.longValue()

            try {
               while (!es.awaitTermination(500, TimeUnit.MILLISECONDS));
            } catch (InterruptedException e) {
               throw new CacheException(e);
            }
            return count.longValue();
         }
      }
      throw log.missingMigrationData(cache.getName());
   }
View Full Code Here

Examples of java.util.concurrent.atomic.AtomicLong.longValue()

         int resultLastPost = JournalImpl.readJournalFile(fileFactory, file, new JournalReaderCallback()
         {

            private void checkID(final long id)
            {
               if (id > maxID.longValue())
               {
                  maxID.set(id);
               }
            }
View Full Code Here

Examples of javax.json.JsonNumber.longValue()

        final JsonArray result = this.cut.allAsJson();
        assertNotNull(result);
        assertThat(result.size(), is(1));
        JsonObject actual = result.getJsonObject(0);
        JsonNumber actualId = actual.getJsonNumber(Registrations.CONFIRMATION_ID);
        assertThat(expected.getId(), is(actualId.longValue()));

    }

    void merge(Registration registration) {
        when(this.cut.em.merge(registration)).thenReturn(registration);
View Full Code Here

Examples of jcmdline.LongParam.longValue()

         
          //-b
          LongParam bOption = (LongParam) cmdLineHandler.getOption(SplitParsedCommand.B_ARG);         
          if(SplitParsedCommand.S_SIZE.equals(parsedCommandDTO.getSplitType())){
            if(bOption.isSet()){     
              parsedCommandDTO.setSplitSize(new Long(bOption.longValue()));
            }else{
              throw new ParseException(ParseException.ERR_NO_B);
            }
          }else{
            if(bOption.isSet()){
View Full Code Here

Examples of jnr.constants.Constant.longValue()

                        c = new UnknownConstant(0, v.name());
                    } else {
                        c = new UnknownConstant(nextUnknown.getAndAdd(1), v.name());
                    }
                } else if (bitmask) {
                    known |= c.longValue();
                }
                cache[v.ordinal()] = c;
            }

            //
View Full Code Here

Examples of jnr.ffi.byref.NumberByReference.longValue()

            if (nativeFileActions != null) ((UnixLibC) libc()).posix_spawn_file_actions_destroy(nativeFileActions);
            if (nativeSpawnAttributes != null) ((UnixLibC) libc()).posix_spawnattr_destroy(nativeSpawnAttributes);
        }

        if (result != 0) return -1; // result will be errno, but we can't indicate error because we return pid
        return pid.longValue();
    }
   
    public int flock(int fd, int mode) {
        return libc().flock(fd, mode);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.