Package org.jcsp.net
Class Utils
- java.lang.Object
-
- org.jcsp.net.Utils
-
public class Utils extends java.lang.Object
This class provides some utility methods that developers might find useful when implementing JCSP.NET communication protocol drivers.
-
-
Constructor Summary
Constructors Constructor Description Utils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
arrayToString(java.lang.String[] array)
This takes a String[] and returns a String that can be converted back into an identical String[] using the stringToArray method.private static java.lang.String
deStuffString(java.lang.String str)
static java.lang.String[]
stringToArray(java.lang.String str)
This takes a String in the form of that returned from the arrayToString method and returns a String[].private static java.lang.String
stuffString(java.lang.String str)
-
-
-
Method Detail
-
arrayToString
public static java.lang.String arrayToString(java.lang.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.
-
stuffString
private static java.lang.String stuffString(java.lang.String str)
-
stringToArray
public static java.lang.String[] stringToArray(java.lang.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[].
-
deStuffString
private static java.lang.String deStuffString(java.lang.String str)
-
-