Examples of current()


Examples of com.sgfj.SGFNodeIterator.current()

                    // search for appropriate variant
                    SGFMove newMove = new SGFMove(cursorX, cursorY, game.colorToPlay);
                    SGFMove variantMove;
                    i.firstVariant(true);
                    do {
                        variantMove = i.current().getMoveProperty();
                    } while (!newMove.equals(variantMove) && i.nextVariant(true) != null);

                    if (!newMove.equals(variantMove))
                        return false;
                }
View Full Code Here

Examples of de.dfki.km.json.jsonld.JSONLDUtils.NameGenerator.current()

        for (Map<String, Object> bnode : bnodes) {
            String iri = (String) bnode.get("@id");
            if (c14n.inNamespace(iri)) {
                while (subjects.containsKey(ngTmp.next()))
                    ;
                renameBlankNode(bnode, ngTmp.current());
                iri = (String) bnode.get("@id");
            }
            Map<String, Object> tmp = new HashMap<String, Object>();
            tmp.put("props", null);
            tmp.put("refs", null);
View Full Code Here

Examples of java.text.AttributedCharacterIterator.current()

  public void test1(TestHarness harness)
  {
    harness.checkPoint("getIterator()");
    AttributedString as = new AttributedString("ABC");
    AttributedCharacterIterator aci = as.getIterator();
    harness.check(aci.current() == 'A');
    harness.check(aci.next() == 'B');
    harness.check(aci.next() == 'C');
    harness.check(aci.next() == CharacterIterator.DONE);

    AttributedString as2 = new AttributedString("");
View Full Code Here

Examples of java.text.BreakIterator.current()

    int previous = iter.first();
   
    AttributedCharacterIterator best = null;
   
    while (iter.next() != BreakIterator.DONE) {
      final AttributedCharacterIterator candidate = text.getIterator(null, previous, iter.current());

      if (getPixelWidth(candidate) <= width) {
        // check for line breaks within the provided text
        // unfortunately, the BreakIterators are too dumb to tell *why* they consider the
        // location a break, so the check needs to be implemented here
View Full Code Here

Examples of java.text.BreakIterator.current()

        // unfortunately, the BreakIterators are too dumb to tell *why* they consider the
        // location a break, so the check needs to be implemented here
        final CharacterIterator cit = iter.getText();
        if (isHardLineBreak(cit)) {
          lines.add(candidate);
          previous = iter.current();
          best = null;
        } else {
          best = candidate;
        }
      } else {
View Full Code Here

Examples of java.text.BreakIterator.current()

        // a special check for a hard line break just after the word
        // that got moved to the next line
        final CharacterIterator cit = iter.getText();
        if (isHardLineBreak(cit)) {
          lines.add(text.getIterator(null, previous, iter.current()));
          previous = iter.current();
        }
       
        // Pick the shortest candidate possible (backtrack a bit, if needed)
        if (iter.current() > previous + 1) {
View Full Code Here

Examples of java.text.BreakIterator.current()

        // a special check for a hard line break just after the word
        // that got moved to the next line
        final CharacterIterator cit = iter.getText();
        if (isHardLineBreak(cit)) {
          lines.add(text.getIterator(null, previous, iter.current()));
          previous = iter.current();
        }
       
        // Pick the shortest candidate possible (backtrack a bit, if needed)
        if (iter.current() > previous + 1) {
          iter.previous();
View Full Code Here

Examples of java.text.BreakIterator.current()

          lines.add(text.getIterator(null, previous, iter.current()));
          previous = iter.current();
        }
       
        // Pick the shortest candidate possible (backtrack a bit, if needed)
        if (iter.current() > previous + 1) {
          iter.previous();
        }

        best = null;
View Full Code Here

Examples of java.text.BreakIterator.current()

    // return the original iterator if there are no suitable break points
    AttributedCharacterIterator best = text;
    wordIterator.setText(text);
   
    while (wordIterator.next() != BreakIterator.DONE) {
      final AttributedCharacterIterator candidate = tmpText.getIterator(null, tmpText.getIterator().getBeginIndex(), wordIterator.current() - offset);
     
      if (getPixelWidth(candidate) <= width) {
        best = candidate;
      } else {
        return best;
View Full Code Here

Examples of java.text.BreakIterator.current()

      List<String> tokens = new ArrayList<String>();
      BreakIterator bi = BreakIterator.getWordInstance(aLocale);
      bi.setText(aText);
      int begin = 0;
      while (bi.next() != BreakIterator.DONE) {
        tokens.add(aText.substring(begin, bi.current()));
        begin = bi.current();
      }
      return tokens.toArray(new String[tokens.size()]);
    }
}
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.