Class JSFunction

java.lang.Object
com.amalgamasimulation.desktop.html.js.JSFunction
All Implemented Interfaces:
JSConvertable

public class JSFunction extends Object implements JSConvertable
A class representing a JavaScript function that implements the JSConvertable interface. This class encapsulates a string representation of a JavaScript function and provides a method to convert it to its JavaScript representation.
Author:
Alexey Glazyrin
  • Constructor Details

    • JSFunction

      public JSFunction(String function)
      Constructs a new JSFunction with the specified JavaScript function string.
      Parameters:
      function - the string representation of the JavaScript function
  • Method Details

    • toJS

      public String toJS()
      Description copied from interface: JSConvertable
      Converts the object to a JavaScript string representation.
      Specified by:
      toJS in interface JSConvertable
      Returns:
      the JavaScript representation of the object