Examples of intValue()


Examples of java.lang.Double.intValue()

      if ("1+2".equals(question)) {
        answer = "3";
      } else {
            Random r = new Random(new Date().getTime());
            Double d = new Double((r.nextDouble() * 20) - 1);
            answer = new String(answers[d.intValue()]);
      }
    System.out.println("EightBall answer: " + answer);
    return answer;
    }

View Full Code Here

Examples of java.lang.Integer.intValue()

   * @param reader The CatalogReader to use.
   */
  public void addReader(String mimeType, CatalogReader reader) {
    if (readerMap.contains(mimeType)) {
      Integer pos = (Integer) readerMap.get(mimeType);
      readerArr.set(pos.intValue(), reader);
    } else {
      readerArr.add(reader);
      Integer pos = new Integer(readerArr.size()-1);
      readerMap.put(mimeType, pos);
    }
View Full Code Here

Examples of java.lang.Long.intValue()

        }
        else
        {
            // for some reason the number column is of "long" data type!
            Long count = new Long(row.getLongColumn("num"));
            numItems = new Integer(count.intValue());
        }
        return numItems;
    }
   
   
View Full Code Here

Examples of java.lang.Number.intValue()

            } else if (s.endsWith("f")) {
                n = n.floatValue();
            } else if (s.endsWith("l")) {
                n = n.longValue();
            } else if (s.endsWith("i")) {
                n = n.intValue();
            }
        } else {
            n = matchNumber(s);
//            if (n instanceof Long) {
//                n = n.intValue();
View Full Code Here

Examples of java.math.BigDecimal.intValue()

    try {
      Object oContent = oMsg.getContent();
      if (oContent instanceof MimeMultipart) {
        try {
          saveMimeParts(oMsg, sMsgCharSeq, sBoundary, sGuMimeMsg, sMessageID, dPgMessage.intValue(), 0);
        } catch (MessagingException msge) {
          // Close Mbox file rollback and re-throw
          try { oConn.rollback(); } catch (Exception ignore) {}
          throw new MessagingException(msge.getMessage(), msge.getNextException());
        }
View Full Code Here

Examples of java.math.BigInteger.intValue()

    public Pfx(
        ASN1Sequence   seq)
    {
        BigInteger  version = ((DERInteger)seq.getObjectAt(0)).getValue();
        if (version.intValue() != 3)
        {
            throw new IllegalArgumentException("wrong version for PFX PDU");
        }

        contentInfo = ContentInfo.getInstance(seq.getObjectAt(1));
View Full Code Here

Examples of java.util.Date.intValue()

         mvalue = SimpleValueSupport.wrap(jvalue);
      }
      else if(metaType.equals(SimpleMetaType.INTEGER_PRIMITIVE))
      {
         Integer jvalue = Integer.valueOf(value);
         int primitive = jvalue.intValue();
         mvalue = SimpleValueSupport.wrap(primitive);
      }
      else if(metaType.equals(SimpleMetaType.LONG))
      {
         Long jvalue = Long.valueOf(value);
View Full Code Here

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

        final AtomicInteger score;
        synchronized (map) {
            score = map.remove(obj);
            if (score == null) return 0;
        }
        return score.intValue();
    }

    public boolean containsKey(final E obj) {
        synchronized (map) {
            return map.containsKey(obj);
View Full Code Here

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

        if (obj == null) return 0;
        final AtomicLong score = this.map.remove(obj);
        if (score == null) return 0;

        // decrease overall counter
        this.gcount -= score.intValue();
        return score.intValue();
    }

    public boolean containsKey(final E obj) {
        return this.map.containsKey(obj);
View Full Code Here

Examples of java.util.concurrent.atomic.LongAdder.intValue()

            if (b.contains(element) && !seen.contains(element))
                fp.increment();
            b.add(element);
            seen.add(element);
        });
        double fprate = 100.0 * fp.intValue() / count;
        System.out.println("False Positives = " + fp + ", FP-Rate = " + fprate);
        long end = System.currentTimeMillis();
        MemoryBFTest.printStat(start, end, count);
    }

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.