Class Operator.MapAction

  • All Implemented Interfaces:
    java.lang.Runnable
    Enclosing class:
    Operator

    protected abstract class Operator.MapAction
    extends QueueTool.QueueAction
    Can be used to simplify nonprimitive type component's methods mapping. Like this:
    public Color getBackground() {
    return((Color)runMapping(new MapAction("getBackground") {
    public Object map() {
    return(((Component)getSource()).getBackground());
    }
    }));
    }
    See Also:
    Operator.runMapping(Operator.MapAction)
    • Constructor Detail

      • MapAction

        public MapAction​(java.lang.String description)
        Constructs a MapAction object.
        Parameters:
        description - an action description.
    • Method Detail

      • launch

        public final java.lang.Object launch()
                                      throws java.lang.Exception
        Description copied from class: QueueTool.QueueAction
        Method to implement action functionality.
        Specified by:
        launch in class QueueTool.QueueAction
        Returns:
        an Object - action result
        Throws:
        java.lang.Exception
      • map

        public abstract java.lang.Object map()
                                      throws java.lang.Exception
        Executes a map action.
        Returns:
        an action result.
        Throws:
        java.lang.Exception