Class 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)
    • 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DistributedUtilities

        public DistributedUtilities()
    • 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.