Class ArraySort

    • Field Detail

      • allowDuplicates

        public Parameter allowDuplicates
        Tells the actor whether or not to remove duplicate elements. This is a boolean that defaults to true.
      • ascending

        public Parameter ascending
        The sort order attribute. This tells the actor whether to sort the elements in ascending or descending order. It is a boolean that defaults to true, which means ascending order.
    • Method Detail

      • fire

        public void fire()
                  throws IllegalActionException
        Consume at most one array from the input port and produce a sorted array on the output port. If there is no token on the input, then no output is produced. If the input is an empty array, then the same empty array token is produced on the output.
        Specified by:
        fire in interface Executable
        Overrides:
        fire in class AtomicActor<TypedIOPort>
        Throws:
        IllegalActionException - If there is no director, or if sorting is not supported for the input array.