Examples of remainder()


Examples of java.math.BigInteger.remainder()

    int max = 0;
    for (int i = 0; i < word.length(); i++) {
      String test = rack + word.charAt(i);
      BigInteger hash = getHash(test);
      for (Entry<BigInteger, String> e : _hashes.entrySet()) {
        if (hash.remainder(e.getKey()).equals(BigInteger.ZERO)) {
          String w = e.getValue();
          int points = getPoints(w);
          if (points == max) {
            if (w.compareTo(s) < 0) {
              s = w;
View Full Code Here

Examples of java.math.BigInteger.remainder()

     */
    public void setFractionalSecond(BigDecimal fractional) {
        calendarValue = null;
        second = fractional.intValue();
        BigInteger micros = fractional.movePointRight(6).toBigInteger();
        micros = micros.remainder(BigInteger.valueOf(1000000));
        microsecond = micros.intValue();
    }

    /**
     * <p>Return high order component for XML Schema 1.0 dateTime datatype field for
View Full Code Here

Examples of java.math.BigInteger.remainder()

  public synchronized static boolean has(int number, int denominator) {
    boolean returnValue = true;
    BigInteger foo = BigInteger.valueOf(number);
    if (BigInteger.valueOf(0L).compareTo(
        foo.remainder(BigInteger.valueOf(denominator))) == 0) {
      returnValue = false;
    }
    return returnValue;
  }
View Full Code Here

Examples of org.goda.time.DateTimeField.remainder()

            DateTimeField field = iFieldType.getField(chrono);
            int minDigits = iMinDigits;

            long fraction;
            try {
                fraction = field.remainder(instant);
            } catch (RuntimeException e) {
                if (buf != null) {
                    appendUnknownString(buf, minDigits);
                }
//                else {
View Full Code Here

Examples of org.goda.time.DateTimeField.remainder()

            DateTimeField field = iFieldType.getField(chrono);
            int minDigits = iMinDigits;

            long fraction;
            try {
                fraction = field.remainder(instant);
            } catch (RuntimeException e) {
                if (buf != null) {
                    appendUnknownString(buf, minDigits);
                }
//                else {
View Full Code Here

Examples of org.joda.time.DateTimeField.remainder()

        }

        // UnsupportedDateTimeField.remainder(long instant) is unsupported and
        // should always thrown an UnsupportedOperationException
        try {
            fieldOne.remainder(1000000L);
            assertTrue(false);
        } catch (UnsupportedOperationException e) {
            assertTrue(true);
        }
View Full Code Here

Examples of org.joda.time.DateTimeField.remainder()

            DateTimeField field = iFieldType.getField(chrono);
            int minDigits = iMinDigits;

            long fraction;
            try {
                fraction = field.remainder(instant);
            } catch (RuntimeException e) {
                if (buf != null) {
                    appendUnknownString(buf, minDigits);
                } else {
                    printUnknownString(out, minDigits);
View Full Code Here

Examples of org.jsoup.parser.TokenQueue.remainder()

           
            else if (cq.matchChomp("~="))
                return root.getElementsByAttributeValueMatching(key, cq.remainder());
           
            else
                throw new SelectorParseException("Could not parse attribute query '%s': unexpected token at '%s'", query, cq.remainder());
        }
    }

    private Elements allElements() {
        return root.getAllElements();
View Full Code Here

Examples of org.jsoup.parser.TokenQueue.remainder()

        if (cq.isEmpty()) {
            return key.startsWith("^") ? root.getElementsByAttributeStarting(key.substring(1)) : root.getElementsByAttribute(key);
        } else {
            if (cq.matchChomp("="))
                return root.getElementsByAttributeValue(key, cq.remainder());

            else if (cq.matchChomp("!="))
                return root.getElementsByAttributeValueNot(key, cq.remainder());

            else if (cq.matchChomp("^="))
View Full Code Here

Examples of org.jsoup.parser.TokenQueue.remainder()

        } else {
            if (cq.matchChomp("="))
                return root.getElementsByAttributeValue(key, cq.remainder());

            else if (cq.matchChomp("!="))
                return root.getElementsByAttributeValueNot(key, cq.remainder());

            else if (cq.matchChomp("^="))
                return root.getElementsByAttributeValueStarting(key, cq.remainder());

            else if (cq.matchChomp("$="))
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.