Home > Contents > Index >
Utilities.goodString
Indicates whether a string is not empty or null.
Syntax
public static final boolean goodString(String str)Parameters
str
- Input. Specify the string to evaluate.
Returns
Returns
true
if string is not null and length is not zero (0), otherwise, returnsfalse
.Example
The following code determines whether the
cs.pagecachefolder
property contains a value:
String Property = "CS.Property.cs.pagecachefolder"; String path = ics.ResolveVariables(Property); if ( !Utilities.goodString( path ) { // not set in properties; check arguments path = vIn.getValString( "pagecachefolder"); }Note:
For example, if you are using "if ( !Utilities.goodString( (String)ics.ResolveVariables(Property) )" then, make sure you type cast to String .
Home > Contents > Index > ![]()
Oracle JAVA Reference
Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.