CSP for Java
(JCSP) 1.1-rc4

org.jcsp.net
Class Utils

java.lang.Object
  extended by org.jcsp.net.Utils

public class Utils
extends Object

This class provides some utility methods that developers might find useful when implementing JCSP.NET communication protocol drivers.

Author:
Quickstone Technologies Limited

Constructor Summary
Utils()
           
 
Method Summary
static String arrayToString(String[] array)
           This takes a String[] and returns a String that can be converted back into an identical String[] using the stringToArray method.
static String[] stringToArray(String str)
           This takes a String in the form of that returned from the arrayToString method and returns a String[].
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Utils

public Utils()
Method Detail

arrayToString

public static String arrayToString(String[] array)

This takes a String[] and returns a String that can be converted back into an identical String[] using the stringToArray method.

The intended purpose of this is to possibly aid in implementing the getStringForm() method of the abstract NodeAddressID class.

Parameters:
array - the String[] to convert into a String.
Returns:
the converted array as a String.

stringToArray

public static String[] stringToArray(String str)

This takes a String in the form of that returned from the arrayToString method and returns a String[].

The intended purpose of this is to possibly aid in implementing the getAddressIDFromString() method of the abstract NodeAddressID class.

Parameters:
str - the String to convert back into a String[].
Returns:
the converted String as a String[].

CSP for Java
(JCSP) 1.1-rc4

Submit a bug or feature to jcsp-team@kent.ac.uk
Version 1.1-rc4 of the JCSP API Specification (Copyright 1997-2008 P.D.Austin and P.H.Welch - All Rights Reserved)
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.