/** * <p> * Checks if a String is not empty (""), not null and not whitespace only. * </p> * * <pre> * StringUtils.isNotBlank(null) = false * StringUtils.isNotBlank("") = false * StringUtils.isNotBlank(" ") = false * StringUtils.isNotBlank("bob") = true * StringUtils.isNotBlank(" bob ") = true * </pre> * * @param str the String to check, may be null * @return <code>true</code> if the String is not empty and not null and not whitespace * @since 1.5.2 */ public static boolean isNotBlank( String str ) { return !StringUtils.isBlank( str ); }
@Override protected String extrapolateChildUrl( String parentUrl, boolean appendPath, Map<Object, Object> context ) { Object childDirectory = context.get( CHILD_DIRECTORY ); Object childPathAdjustment = context.get( CHILD_PATH_ADJUSTMENT ); if ( StringUtils.isBlank( parentUrl ) || childDirectory == null || childPathAdjustment == null || !appendPath ) { return parentUrl; } // append childPathAdjustment and childDirectory to parent url return appendPath( parentUrl, childDirectory.toString(), childPathAdjustment.toString() ); }
protected Path configLocation() { final String top = StringUtils.isBlank(getConfigFile()) ? DEFAULT_CONFIG_LOCATION : getConfigFile(); System.out.println(project()); return project() .getBasedir() .toPath() .resolve(top); }
protected final Path configLocation() { final String top = StringUtils.isBlank(configFile()) ? DEFAULT_CONFIG_LOCATION : configFile(); System.out.println(project()); return project() .getBasedir() .toPath() .resolve(top); }
private boolean matches(Document document, String where) { final String lastWhere; if (StringUtils.isBlank(where)) { return true; } else if (where.contains(PATH_SEPARATOR)) { final int index = where.lastIndexOf(PATH_SEPARATOR); final String parentIds = where.substring(0, index).trim(); lastWhere = where.substring(index + PATH_SEPARATOR.length()).trim(); final Optional<? extends Document> parent = document.getParent(); if (parent.isPresent()) { if (!matches(parent.get(), parentIds)) { return false; } } } else { lastWhere = where.trim(); } final int index = lastWhere.indexOf(SET_OPERATOR); final String key, value; if (index == -1) { key = "id"; value = "^" + lastWhere + "$"; } else { key = lastWhere.substring(0, index); value = lastWhere.substring(index + SET_OPERATOR.length()); } return checkIf(document, key, value); }
private String getOriginModuleUrl(Module module) { final String origin = ExtraDataModuleExtension.getOrigin(module); if (StringUtils.isBlank(origin) && !INTERNAL_MODULES.contains(module.getId().toString())) { return DEFAULT_GITHUB_MODULE_URL + module.getId(); } return origin; }
if (StringUtils.isBlank(moduleDescription)) { moduleDescription = translationSystem.translate("${engine:menu#game-details-no-description}");
if (StringUtils.isBlank(set) || !set.contains(SET_OPERATOR) || set.indexOf(SET_OPERATOR) <= 0)
if (StringUtils.isBlank(encoding)) { encoding = projectEncoding;
if ( StringUtils.isBlank( pluginGroup ) )
if ( StringUtils.isBlank( module ) )
if (StringUtils.isBlank(seed.getText())) { getManager().createScreen(MessagePopup.ASSET_URI, MessagePopup.class).setMessage("Error", "Game seed cannot be empty!"); } else {
public String getCodeEnumValue() { String retVal = myDisplay; if (StringUtils.isBlank(retVal)) { retVal = myCode; if (Character.isDigit(myCode.charAt(0))) {
if ( StringUtils.isBlank( mode ) )
/** * */ public void addText( String sql ) { if ( !StringUtils.isBlank( sql ) ) { this.tSqlCommand += sql; } }
public File getOutputDirectory() { File out = inplace ? warSourceDirectory : webappDirectory; if ( !StringUtils.isBlank( modulePathPrefix ) ) { out = new File(out, modulePathPrefix); } return out; }
public StringOperand( final Version originModelVersion, final String data ) { super( originModelVersion ); if ( StringUtils.isBlank( data ) ) { throw new IllegalArgumentException( "String operand may not carry empty/null string!" ); } this.str = data; }
protected final void addProperty(final Properties properties, final String name, final String value) { if (StringUtils.isBlank(name)) { throw new IllegalArgumentException("name must be defined"); } if (StringUtils.isNotBlank(value)) { properties.setProperty(name, value); } } }
public StringContentLocator( String content, String mimeType ) { super( toByteArray( content ), StringUtils.isBlank( mimeType ) ? "text/plain" : mimeType ); this.content = content; }
public Date parse(final String timestamp) throws ProcessingException { if (StringUtils.isBlank(timestamp)) { return null; } try { return parser.parse(timestamp); } catch (Exception ex) { throw new ProcessingException("Unable to parse timestamp \"" + timestamp + "\"", ex); } }