cz.cuni.amis.pogamut.sposh.elements

Class DriveCollection

    • Field Detail

      • dataFlavor

        public static final DataFlavor dataFlavor
        Data flavor of DC, used for drag and drop
    • Method Detail

      • getGoal

        public Trigger<DriveCollection> getGoal()
        Get goal of the DC. As long as goal is not satisfied, the DC will go on.
        Returns:
        goal of the DC
      • getDrives

        public List<DriveElement> getDrives()
        Get list of all drives of this DC in correct order (drive with higest priority is first, drive with lowest priority is last).
        Returns:
        unmodifiable list of drives.
      • toString

        public String toString()
        Serialize DC into a parser readable form. If goal is empty, don't include it. Example: (DC funbot (goal ((cz.cuni.HaveFun)(cz.cuni.Sing))) (drives ( (fun (trigger ((cz.cuni.IsAtParty)(cz.cuni.FriendsInSight)) ) cz.cuni.Enjoy ) (default cz.cuni.DoNothing) ) ) )
        Overrides:
        toString in class Object
        Returns:
        multi-line string that parser can read.
      • setName

        public void setName(String newName)
                     throws InvalidNameException
        Change name of the DC and notify property listeners.
        Parameters:
        newName - New name of the DC.
        Throws:
        InvalidNameException - throw if name is not valid (spaces, braces...)
      • removeDrive

        public void removeDrive(DriveElement drive)
        Remove drive from the drive collection. If it is the last drive of DC, create new one before removing passed drive in order to have at least one drive in DC at all times.
        Parameters:
        drive - Drive to be removed.

Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.