Class JavaScript


  • public class JavaScript
    extends java.lang.Object
    Represents a javascript element.
    Since:
    6.0.0
    Author:
    tomyeh
    • Constructor Summary

      Constructors 
      Constructor Description
      JavaScript​(java.lang.String content)
      Creates by assigning the content (JavaScript codes).
      JavaScript​(java.lang.String src, java.lang.String charset)
      Creates by specifying the file to contain the JavaScript codes.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      java.lang.String getCharset()
      Returns the charset, or null if getContent() is not null.
      java.lang.String getContent()
      Returns the JavaScript codes, or null if getSrc() is not null.
      java.lang.String getSrc()
      Returns the URI of the file containing the JavaScript codes, or null if getContent() is not null.
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • JavaScript

        public JavaScript​(java.lang.String src,
                          java.lang.String charset)
        Creates by specifying the file to contain the JavaScript codes.
        Parameters:
        src - URI of the file containing the JavaScript codes.
        charset - the charset. If null, "UTF-8" is assumed.
      • JavaScript

        public JavaScript​(java.lang.String content)
        Creates by assigning the content (JavaScript codes).
        Parameters:
        content - the JavaScript codes.
    • Method Detail

      • getSrc

        public java.lang.String getSrc()
        Returns the URI of the file containing the JavaScript codes, or null if getContent() is not null.
      • getCharset

        public java.lang.String getCharset()
        Returns the charset, or null if getContent() is not null.
      • getContent

        public java.lang.String getContent()
        Returns the JavaScript codes, or null if getSrc() is not null.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object