Package ptolemy.distributed.util
Class DistributedUtilities
- java.lang.Object
-
- ptolemy.distributed.util.DistributedUtilities
-
public class DistributedUtilities extends java.lang.Object
Utilities for the distributed package. This includes different conversions and printing facilities.- Since:
- Ptolemy II 5.1
- Version:
- $Id$
- Author:
- Daniel Lazaro Cuadrado (kapokasa@kom.aau.dk)
- Pt.AcceptedRating:
- Red (cxh)
- Pt.ProposedRating:
- Red (kapokasa)
-
-
Constructor Summary
Constructors Constructor Description DistributedUtilities()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.LinkedList
convertIntegersToList(java.lang.Integer[][] receiversIntegers)
Converts a bidimensional array of Integer into a linked list of Integers.static java.lang.Integer[][]
convertReceiversToIntegers(Receiver[][] receivers)
Converts a bidimensional array of receivers into a bidimensional array containing only the integer IDs of the receivers.static java.lang.String
integersArrayToString(java.lang.Integer[][] array)
Converts a bidimensional array of Integer a String for printing purposes.static java.lang.String
receiversArrayToString(Receiver[][] array)
Converts a bidimensional array of Receivers into a String for printing purposes.
-
-
-
Method Detail
-
convertIntegersToList
public static java.util.LinkedList convertIntegersToList(java.lang.Integer[][] receiversIntegers)
Converts a bidimensional array of Integer into a linked list of Integers.- Parameters:
receiversIntegers
- A bidimensional array of Integers.- Returns:
- LinkedList A list.
-
convertReceiversToIntegers
public static java.lang.Integer[][] convertReceiversToIntegers(Receiver[][] receivers)
Converts a bidimensional array of receivers into a bidimensional array containing only the integer IDs of the receivers.- Parameters:
receivers
- A bidimensional array of receivers.- Returns:
- Integer[][] A bidimensional array of receivers IDs.
-
integersArrayToString
public static java.lang.String integersArrayToString(java.lang.Integer[][] array)
Converts a bidimensional array of Integer a String for printing purposes.- Parameters:
array
- A bidimensional array of Integer.- Returns:
- String A string.
-
receiversArrayToString
public static java.lang.String receiversArrayToString(Receiver[][] array)
Converts a bidimensional array of Receivers into a String for printing purposes.- Parameters:
array
- A bidimensional array of Receiver.- Returns:
- String A string.
-
-