Examples of lastIndexOf()


Examples of javax.swing.DefaultListModel.lastIndexOf()

    harness.check(m1.lastIndexOf("Z", -1), -1);

    boolean pass = false;
    try
    {
      int i = m1.lastIndexOf("Z", 99);
    }
    catch (IndexOutOfBoundsException e)
    {
      pass = true;   
    }
View Full Code Here

Examples of org.apache.tomcat.lite.io.CBuffer.lastIndexOf()

                            }
                        }
                        if (lastSlash == -1) {
                            lastSlash = tmp.nthSlash(nesting + 1);
                        } else {
                            lastSlash = tmp.lastIndexOf('/');
                        }
                        tmp.delete(lastSlash);
                        pos = find(contexts, tmp);
                    }
View Full Code Here

Examples of org.apache.yoko.rmi.util.ByteString.lastIndexOf()

        if (repid.startsWith("IDL:")) {

            ByteString id = new ByteString(repid);

            try {
                int end = id.lastIndexOf(':');
                ByteString s = end < 0 ? id.substring(4) : id.substring(4, end);

                ByteBuffer bb = new ByteBuffer();

                //
View Full Code Here

Examples of org.eclipse.core.runtime.IPath.lastIndexOf()

        final InputStream is = new FileInputStream(path);

        final String fileName;
        if (path.contains("/")) {
          fileName = path.substring(path.lastIndexOf("/") + 1);
        } else {
          fileName = path.substring(path.lastIndexOf("\\") + 1);
        }

        IFile importFile = importProject.getFile(fileName);
View Full Code Here

Examples of org.eclipse.core.runtime.Path.lastIndexOf()

        final InputStream is = new FileInputStream(path);

        final String fileName;
        if (path.contains("/")) {
          fileName = path.substring(path.lastIndexOf("/") + 1);
        } else {
          fileName = path.substring(path.lastIndexOf("\\") + 1);
        }

        IFile importFile = importProject.getFile(fileName);
View Full Code Here

Examples of org.geotools.util.SimpleInternationalString.lastIndexOf()

                        final InternationalString description = fd.getDescription();
                        sb.append(description != null ? description.toString()+ "," : "");
                    }
                    String description = sb.toString();
                    int pos = -1;
                    if (description.length() > 0 && (pos = description.lastIndexOf(",")) != -1) {
                        description = description.substring(0, pos);
                    }
                    DefaultRangeType range = new DefaultRangeType(covName,new SimpleInternationalString(description),fieldTypes);
                    rangeMap.put(covName, range);
                }
View Full Code Here

Examples of org.jruby.util.ByteList.lastIndexOf()

        // for usec we shall not use: ((long) floatValue * 1000000) % 1000
        // if ( usec >= 0 ) timestamp.setNanos( timestamp.getNanos() + usec * 1000 );
        // due doubles inaccurate precision it's better to parse to_s :
        final ByteList strValue = ((RubyString) value.to_s()).getByteList();
        final int dot1 = strValue.lastIndexOf('.') + 1, dot4 = dot1 + 3;
        final int len = strValue.getRealSize() - strValue.getBegin();
        if ( dot1 > 0 && dot4 < len ) { // skip .123 but handle .1234
            final int end = Math.min( len - dot4, 3 );
            CharSequence usecSeq = strValue.subSequence(dot4, end);
            final int usec = Integer.parseInt( usecSeq.toString() );
View Full Code Here

Examples of org.opengis.util.InternationalString.lastIndexOf()

                        final InternationalString description = fd.getDescription();
                        sb.append(description != null ? description.toString()+ "," : "");
                    }
                    String description = sb.toString();
                    int pos = -1;
                    if (description.length() > 0 && (pos = description.lastIndexOf(",")) != -1) {
                        description = description.substring(0, pos);
                    }
                    DefaultRangeType range = new DefaultRangeType(covName,new SimpleInternationalString(description),fieldTypes);
                    rangeMap.put(covName, range);
                }
View Full Code Here

Examples of org.resmedicinae.resmedlib.term.String.lastIndexOf()

            if (returnVal == JFileChooser.APPROVE_OPTION) {
                String curFile = chooser.getSelectedFile().getAbsolutePath();
                System.out.println("B: curfile: " + curFile);
                curFile = curFile.replace('\\', '/');
                setIndexFile(curFile);
                setGlobalPath(curFile.substring(0, curFile.lastIndexOf("/") + 1));
                // setUpdateAfterChangingHealthRecordData();
                System.out.println("You choose to open this file: " + curFile);
            } else
                System.out.println("returnVal: " + returnVal);
        } catch (Exception e) {
View Full Code Here

Examples of org.rssowl.core.internal.persist.LongArrayList.lastIndexOf()

    list.add(2);

    assertTrue(list.elementsEqual(new long[] { 0, 1, 2 }));
    assertFalse(list.elementsEqual(new long[] { 1, 6, 2 }));

    assertEquals(2, list.lastIndexOf(2));

    list.removeByIndex(2);
    assertEquals(2, list.size());
    assertFalse(list.isEmpty());
  }
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.