Examples of lastIndexOf()


Examples of com.alibaba.fastjson.JSONArray.lastIndexOf()

        array.remove(0);
        array.remove(0);
        Assert.assertEquals(0, array.size());
        array.addAll(Arrays.asList(1, 2, 3, 4, 5, 4, 3));
        Assert.assertEquals(2, array.indexOf(3));
        Assert.assertEquals(6, array.lastIndexOf(3));
        {
            AtomicInteger count = new AtomicInteger();
            for (ListIterator<Object> iter = array.listIterator(); iter.hasNext(); iter.next()) {
                count.incrementAndGet();
            }
View Full Code Here

Examples of com.caucho.quercus.env.StringValue.lastIndexOf()

          "Delimiter {0} in regexp '{1}' must not be backslash or alphanumeric.",
          String.valueOf(delim),
          rawRegexp));
    }

    int tail = rawRegexp.lastIndexOf(delim);

    if (tail <= 0)
      throw new QuercusException(L.l(
          "Can't find second {0} in regexp '{1}'.",
          String.valueOf(delim),
View Full Code Here

Examples of com.caucho.util.CharBuffer.lastIndexOf()

        cb.append(servletPath);
      String pathInfo = getPagePathInfo();
      if (pathInfo != null)
        cb.append(pathInfo);

      int p = cb.lastIndexOf('/');
      if (p >= 0)
        cb.setLength(p);
      cb.append('/');
      cb.append(path);
View Full Code Here

Examples of com.caucho.util.CharBuffer.lastIndexOf()

      cb.append(servletPath);
    String pathInfo = getPagePathInfo();
    if (pathInfo != null)
      cb.append(pathInfo);

    int p = cb.lastIndexOf('/');
    if (p >= 0)
      cb.setLength(p);
    cb.append('/');

    return cb.close();
View Full Code Here

Examples of com.caucho.util.CharBuffer.lastIndexOf()

        cb.append(servletPath);
      String pathInfo = getPagePathInfo();
      if (pathInfo != null)
        cb.append(pathInfo);

      int p = cb.lastIndexOf('/');
      if (p >= 0)
        cb.setLength(p);
      cb.append('/');
      cb.append(path);
View Full Code Here

Examples of com.caucho.util.CharBuffer.lastIndexOf()

        cb.append(servletPath);
      String pathInfo = getPagePathInfo();
      if (pathInfo != null)
        cb.append(pathInfo);

      int p = cb.lastIndexOf('/');
      if (p >= 0)
        cb.setLength(p);
      cb.append('/');
      cb.append(path);
View Full Code Here

Examples of com.hazelcast.core.IList.lastIndexOf()

        list.add("item3");
        list.add("item1");
        list.add("item4");
        list.add("item1");

        assertEquals(5, list.lastIndexOf("item1"));
        assertNotEquals(0, list.lastIndexOf("item1"));
        assertNotEquals(3, list.lastIndexOf("item1"));
    }

    @Test(expected = NullPointerException.class)
View Full Code Here

Examples of cybop.basic.String.lastIndexOf()

        Hashtable hashtable = getPatientHashtable();
        for (Enumeration e = hashtable.keys(); e.hasMoreElements();) {
            HealthRecord patient = (HealthRecord) hashtable.get(e.nextElement());
            String patientName = patient.getName().getValue();
            //deleting possible spaces
            patientName = patient.getName().getValue().substring(patientName.lastIndexOf(" ") + 1, patientName.length());
            if (patientName.toLowerCase().startsWith(stringToMatch.toLowerCase())) {
                returnVector.addElement(patient);
            }
        }
        return returnVector;
View Full Code Here

Examples of edu.stanford.nlp.ling.CoreLabel.lastIndexOf()

      allGoldMentions.add(mentions);

      for (CoreLabel word : words) {
        String w = word.get(CoreAnnotations.TextAnnotation.class);
        // found regular token: WORD/POS
        if (!w.startsWith("<") && w.contains("\\/") && w.lastIndexOf("\\/") != w.length()-2) {
          int i = w.lastIndexOf("\\/");
          String w1 = w.substring(0, i);
          // we do NOT set POS info here. We take the POS tags from the parser!
          word.set(CoreAnnotations.TextAnnotation.class, w1);
          word.remove(CoreAnnotations.OriginalTextAnnotation.class);
View Full Code Here

Examples of gnu.trove.list.TIntList.lastIndexOf()

        assertEquals( 9, index );

        index = a.indexOf( 5 );
        assertEquals( 4, index );

        index = a.lastIndexOf( 5 );
        assertEquals( 24, index );

        // Non-existant entry
        index = a.indexOf( 100 );
        assertEquals( -1, index );
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.