Package java.lang

Examples of java.lang.String.endsWith()


    public String toString()
    {
        String ldapDN = "";
        for (int i=0; i<RDNs.size(); i++)
            ldapDN =  get(i) + (i!=0?",":"") + ldapDN;
        if (ldapDN.endsWith(","))
        {
            if (ldapDN.charAt(ldapDN.length()-2) != '\\')
            {
                ldapDN = ldapDN.substring(0,ldapDN.length()-1);
            }
View Full Code Here


    proc.getOutputStream().close();
    final BufferedReader reader = readFromProcess(proc);
    try {
      String line;
      while ((line = reader.readLine()) != null)
        if (line.startsWith(mode) && line.endsWith(name))
          // found it!
          return;
      fail("expected entry " + name + " with mode " + mode + " but found none");
    } finally {
      proc.getOutputStream().close();
View Full Code Here

    {
    int gc = m.groupCount();
    String ns = m.group(1);
    String name = m.group(2);
    if(ns != null && ns.endsWith(":/")
       || name.endsWith(":")
       || s.indexOf("::", 1) != -1)
      return null;
    if(s.startsWith("::"))
      {
      Symbol ks = Symbol.intern(s.substring(2));
View Full Code Here

        // Determine the longest 'from' URI prefix match
        int size = redirects.size();
        for (int i=0; i<size; i++) {
            RedirectParameters elem = redirects.get(i);
            String elemFromWithTrailingSlash = elem.from;
            if (!elemFromWithTrailingSlash.endsWith("/")) {
                elemFromWithTrailingSlash += "/";
            }
            if (requestURI.equals(elem.from) ||
                    requestURI.startsWith(elemFromWithTrailingSlash)) {
                if (redirectMatch != null) {
View Full Code Here

    {
    int gc = m.groupCount();
    String ns = m.group(1);
    String name = m.group(2);
    if(ns != null && ns.endsWith(":/")
       || name.endsWith(":")
       || s.indexOf("::", 1) != -1)
      return null;
    if(s.startsWith("::"))
      {
      Symbol ks = Symbol.intern(s.substring(2));
View Full Code Here

        boolean convert = Character.isLetter(s.charAt(s.length()-1)) && !s.contains("x");
        Number n;
        if (convert) {
            n = matchNumber(s.substring(0, s.length()-1));
            s = s.toLowerCase();
            if (s.endsWith("d")) {
                n = n.doubleValue();
            } else if (s.endsWith("f")) {
                n = n.floatValue();
            } else if (s.endsWith("l")) {
                n = n.longValue();
View Full Code Here

        if (convert) {
            n = matchNumber(s.substring(0, s.length()-1));
            s = s.toLowerCase();
            if (s.endsWith("d")) {
                n = n.doubleValue();
            } else if (s.endsWith("f")) {
                n = n.floatValue();
            } else if (s.endsWith("l")) {
                n = n.longValue();
            } else if (s.endsWith("i")) {
                n = n.intValue();
View Full Code Here

            s = s.toLowerCase();
            if (s.endsWith("d")) {
                n = n.doubleValue();
            } 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 {
View Full Code Here

                n = n.doubleValue();
            } 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) {
View Full Code Here

        Matcher m = symbolPat.matcher(s);
        if (m.matches()) {
            int gc = m.groupCount();
            String ns = m.group(1);
            String name = m.group(2);
            if (ns != null && ns.endsWith(":/") || name.endsWith(":") || s.indexOf("::", 1) != -1)
                return null;
            if (s.startsWith("::")) {
                Symbol ks = Symbol.intern(s.substring(2));
                Namespace kns;
                if (ks.ns != null)
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.