org.opencyc.util
Class StringUtils

java.lang.Object
  |
  +--org.opencyc.util.StringUtils

public class StringUtils
extends java.lang.Object

Provides String utilities not otherwise provided by Violin Strings. All methods are static. There is no need to instantiate this class.

Author:
Stephen L. Reed

Copyright 2001 Cycorp, Inc., license is open source GNU LGPL.

the license

www.opencyc.org

OpenCyc at SourceForge

THIS SOFTWARE AND KNOWLEDGE BASE CONTENT ARE PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OPENCYC ORGANIZATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE AND KNOWLEDGE BASE CONTENT, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


Constructor Summary
StringUtils()
           
 
Method Summary
static boolean isDelimitedString(java.lang.Object object)
          Returns true iff the given object is a string delimited by double quotes.
static boolean isNumeric(java.lang.String string)
          Returns true iff all characters in the given string are numeric.
static java.lang.String removeDelimiters(java.lang.String string)
          Removes delimiter characters from the given string.
static java.lang.String wordsToPhrase(java.util.List words)
          Returns the phrase formed from the given list of words
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringUtils

public StringUtils()
Method Detail

isNumeric

public static boolean isNumeric(java.lang.String string)
Returns true iff all characters in the given string are numeric. A prefix character of "+" or "-" is accepted as numeric. Decimal points are not accepted as numeric by this method.
Parameters:
string - the string to be tested
Returns:
true iff all characters are numeric

isDelimitedString

public static boolean isDelimitedString(java.lang.Object object)
Returns true iff the given object is a string delimited by double quotes.
Parameters:
object - the object to be tested
Returns:
true iff the given object is a string delimited by double quotes

removeDelimiters

public static java.lang.String removeDelimiters(java.lang.String string)
Removes delimiter characters from the given string.
Parameters:
string - the string which has delimiters to be removed
Returns:
a input string without its delimiters

wordsToPhrase

public static java.lang.String wordsToPhrase(java.util.List words)
Returns the phrase formed from the given list of words
Parameters:
words - the phrase words
Returns:
the phrase formed from the given list of words