public java.lang.String[] split(java.lang.String s, java.lang.String delimiter) { return StringUtil.split(s, delimiter); }
public boolean[] split(java.lang.String s, java.lang.String delimiter, boolean x) { return StringUtil.split(s, delimiter, x); }
public java.lang.String[] split(java.lang.String s) { return StringUtil.split(s); }
public float[] split(java.lang.String s, float x) { return StringUtil.split(s, x); }
/** * Splits the string <code>s</code> around comma characters returning the * boolean values of the substrings. * * @param s the string to split * @param x the default value to use for a substring in case an exception * occurs in getting the boolean value for that substring * @return the array of boolean values resulting from splitting string * <code>s</code> around comma characters, or an empty array if * <code>s</code> is <code>null</code> */ public static boolean[] split(String s, boolean x) { return split(s, StringPool.COMMA, x); }
/** * Splits the string <code>s</code> around comma characters returning the * decimal values of the substrings. * * @param s the string to split * @param x the default value to use for a substring in case an exception * occurs in getting the decimal value for that substring * @return the array of decimal values resulting from splitting string * <code>s</code> around comma characters, or an empty array if * <code>s</code> is <code>null</code> */ public static float[] split(String s, float x) { return split(s, StringPool.COMMA, x); }
@Override public List<String> tokenize( String fieldName, String input, String languageId) { return Arrays.asList(StringUtil.split(input, StringPool.PERIOD)); }
private static URL[] _getClassPathURLs(String classPath) throws MalformedURLException { Set<URL> urls = new LinkedHashSet<>(); String[] paths = StringUtil.split(classPath, File.pathSeparatorChar); for (String path : paths) { File file = new File(path); URI uri = file.toURI(); urls.add(uri.toURL()); } return urls.toArray(new URL[urls.size()]); }
private static boolean _isValidUserInitialsFieldNamesValue(String value) { String[] valueParts = StringUtil.split(value); for (String valuePart : valueParts) { if (!ArrayUtil.contains( LanguageConstants.VALUES_USER_INITIALS_FIELD_NAMES, valuePart)) { return false; } } return true; }
public void instantiatingListeners() throws Exception { if (_servletRequestListeners != null) { return; } String[] listenerClassNames = StringUtil.split( servletContext.getInitParameter("portalListenerClasses")); for (String listenerClassName : listenerClassNames) { instantiatingListener(listenerClassName); } }
public DictionaryEntry(String line) { String[] values = StringUtil.split(line, StringPool.SPACE); _word = values[0]; if (values.length == 2) { _weight = GetterUtil.getFloat(values[1]); } else { _weight = 0; } }
private PathHolder[] _toPathHolders(String classPath) { String[] classPathElements = StringUtil.split( classPath, File.pathSeparatorChar); PathHolder[] classPathHolders = new PathHolder[classPathElements.length]; for (int i = 0; i < classPathElements.length; i++) { classPathHolders[i] = new PathHolder(classPathElements[i]); } return classPathHolders; }
public static String getFeedTypeFormat(String feedType) { if (Validator.isNotNull(feedType)) { String[] parts = StringUtil.split(feedType, StringPool.UNDERLINE); if (parts.length == 2) { return GetterUtil.getString(parts[0], FORMAT_DEFAULT); } } return FORMAT_DEFAULT; }
public static String getDestination( HttpServletRequest request, String rootPath) { String headerDestination = request.getHeader("Destination"); String[] pathSegments = StringUtil.split(headerDestination, rootPath); String destination = pathSegments[pathSegments.length - 1]; destination = HttpUtil.decodePath(destination); if (_log.isDebugEnabled()) { _log.debug("Destination " + destination); } return destination; }
private void _init() { String[] nameParts = StringUtil.split(getName(), StringPool.POUND); if (nameParts.length != 3) { throw new IllegalArgumentException( StringBundler.concat( "Name ", getName(), " does not follow the format ", "[name]#[servletContextName]#[subject]")); } _shortName = nameParts[0]; _servletContextName = nameParts[1]; _className = nameParts[2]; }
private void _init() { String[] nameParts = StringUtil.split(getName(), StringPool.POUND); if (nameParts.length != 3) { throw new IllegalArgumentException( StringBundler.concat( "Name ", getName(), " does not follow the format ", "[name]#[servletContextName]#[subject]")); } _shortName = nameParts[0]; _servletContextName = nameParts[1]; _subject = nameParts[2]; }
private String[] _getRequiredFieldNames(Locale locale) { String[] requiredFieldNames = StringUtil.split( LanguageUtil.get( locale, LanguageConstants.KEY_USER_NAME_REQUIRED_FIELD_NAMES)); if (!ArrayUtil.contains( requiredFieldNames, LanguageConstants.VALUE_FIRST_NAME)) { requiredFieldNames = ArrayUtil.append( new String[] {LanguageConstants.VALUE_FIRST_NAME}, requiredFieldNames); } return requiredFieldNames; }
protected boolean isPanelSelectedPortlet(Layout layout, String portletId) { String panelSelectedPortlets = layout.getTypeSettingsProperty( "panelSelectedPortlets"); if (Validator.isNotNull(panelSelectedPortlets)) { String[] panelSelectedPortletsArray = StringUtil.split( panelSelectedPortlets); return ArrayUtil.contains(panelSelectedPortletsArray, portletId); } return false; }
protected void upgradeMultiValuePreference( PortletPreferences portletPreferences, String key) throws ReadOnlyException { String value = portletPreferences.getValue(key, StringPool.BLANK); if (Validator.isNotNull(value)) { portletPreferences.setValues(key, StringUtil.split(value)); } }
public static void checkConnect(String location) { String domainAndPort = HttpUtil.getDomain(location); String[] domainAndPortArray = StringUtil.split( domainAndPort, CharPool.COLON); String domain = domainAndPortArray[0]; int port = -1; if (domainAndPortArray.length > 1) { port = GetterUtil.getInteger(domainAndPortArray[1]); } String protocol = HttpUtil.getProtocol(location); _checkConnect(domain, port, protocol); }