Package java.util

Examples of java.util.ArrayList.toArray()


      }
      else
        ret.add(comp[i]);
    }

    return (MessageComponent[]) ret.toArray(new MessageComponent[0]);
  }

  /**
   * Split a text component to smileys and plain text.
   *
 
View Full Code Here


        ret.add(rightComp[i]);
    }
    else
      ret.add(new TextComponent(text));

    return (MessageComponent[]) ret.toArray(new MessageComponent[0]);
  }
}
View Full Code Here

      txtStart = urlEnd;
    }
    if(txtStart < sb.length())
      ret.add(new TextComponent(sb.substring(txtStart)));

    return (MessageComponent[]) ret.toArray(new MessageComponent[0]);
  }

  /**
   * Parse and get smiley components.
   *
 
View Full Code Here

        ret.add(rightComp[i]);
    }
    else
      ret.add(new TextComponent(text));

    return (MessageComponent[]) ret.toArray(new MessageComponent[0]);
  }

  /**
   * Parse and get text components.
   *
 
View Full Code Here

    {
      String text = sb.substring(txtStart);
      ret.add(new TextComponent(text, currentFont, currentColor));
    }

    return (MessageComponent[]) ret.toArray(new MessageComponent[0]);
  }

  /**
   * Converts a byte array to equivalent char array. This method
   * assumes that the byte values are in the range 0-255.
View Full Code Here

        // What is this ??
        urls.add(new File(clctxt.getRealPath("/")).getCanonicalFile().toURL());

        URL urlsA[]=new URL[urls.size()];
        urls.toArray(urlsA);
        loader = new URLClassLoader(urlsA, this.getClass().getClassLoader());

    }

    /**
 
View Full Code Here

      list.add(new Integer(size));
  for (int size = 14; size <= 36; size += 2)
      list.add(new Integer(size));

  SIZE_CHOICES = new Integer[list.size()];
  list.toArray(SIZE_CHOICES);
    }
    return SIZE_CHOICES;
}

/**
 
View Full Code Here

            for (int j = 0; j < parsedAddresses.length; j++) {
                InternetAddress parsedAddress = parsedAddresses[j];
                result.add(parsedAddress);
            }
        }
        return (InternetAddress[]) result.toArray(new InternetAddress[result.size()]);
    }
   
    private static MimeBodyPart createAttachmentPart(DataSource attachment) throws MessagingException {
        MimeBodyPart attachmentPart = new MimeBodyPart();
        attachmentPart.setDataHandler(new DataHandler(attachment));
View Full Code Here

      // 3. Perform implicit type conversions
      String whenTypeName = ResolverUtil.getCommonType((String[])whenTypeNames.toArray(new String[whenTypeNames.size()]));
      if (whenTypeName == null) {
          throw new QueryResolverException("ERR.015.008.0068", QueryPlugin.Util.getString("ERR.015.008.0068", "WHEN", obj)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
      }
      String thenTypeName = ResolverUtil.getCommonType((String[])thenTypeNames.toArray(new String[thenTypeNames.size()]));
      if (thenTypeName == null) {
          throw new QueryResolverException("ERR.015.008.0068", QueryPlugin.Util.getString("ERR.015.008.0068", "THEN/ELSE", obj)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
      }
      obj.setExpression(ResolverUtil.convertExpression(obj.getExpression(), whenTypeName, metadata));
      ArrayList whens = new ArrayList(whenCount);
View Full Code Here

      }
 
      // Invariants: all the expressions' types are non-null
 
      // 3. Perform implicit type conversions
      String thenTypeName = ResolverUtil.getCommonType((String[])thenTypeNames.toArray(new String[thenTypeNames.size()]));
      if (thenTypeName == null) {
          throw new QueryResolverException("ERR.015.008.0068", QueryPlugin.Util.getString("ERR.015.008.0068", "THEN/ELSE", obj)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
      }
      ArrayList thens = new ArrayList(whenCount);
      for (int i = 0; i < whenCount; i++) {
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.