Cytoscape 2.2 (c) 2004 ISB, MSKCC, UCSD

cytoscape.util
Class Misc

java.lang.Object
  extended bycytoscape.util.Misc

public class Misc
extends Object


Constructor Summary
Misc()
           
 
Method Summary
static Vector getPropertyValues(Properties props, String propName)
          return the (possibly multiple) value of the specified property as a vector.
static String getRGBText(Color color)
           
static boolean isList(String listString, String startToken, String endToken, String delimiter)
          determine whether a string encodes a list
static String[] parseList(String listString, String startToken, String endToken, String delimiter)
          parse and return an array of strings
static Color parseRGBText(String text)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Misc

public Misc()
Method Detail

parseRGBText

public static Color parseRGBText(String text)

getRGBText

public static String getRGBText(Color color)

getPropertyValues

public static Vector getPropertyValues(Properties props,
                                       String propName)
return the (possibly multiple) value of the specified property as a vector. property values (which typically come from cytoscape.prop files) are usually scalar strings, but may be a list of such strings, surrounded by parentheses, and delimited by the value of a property called 'property.delimiter' (whose value is usually "::") get the property value; check to see if it is a list; parse it if necessary


isList

public static boolean isList(String listString,
                             String startToken,
                             String endToken,
                             String delimiter)
determine whether a string encodes a list

Parameters:
listString - a string containing one or more substrings
startToken - marks the beginning of the list; must be at the very start (except for possible leading whitespace
endToken - marks the end of the list; must be at the very end (except for possible trailing whitespace
delimiter - the string (e.g., "::") which separates the substrings
Returns:
true or false

parseList

public static String[] parseList(String listString,
                                 String startToken,
                                 String endToken,
                                 String delimiter)
parse and return an array of strings

Parameters:
listString - a string containing one or more substrings
startToken - marks the beginning of the list; must be at the very start (except for possible leading whitespace
endToken - marks the end of the list; must be at the very end (except for possible trailing whitespace
delimiter - the string (e.g., "::") which separates the substrings
Returns:
an array made up of the substrings

www.cytoscape.org