Class Snippet

    • Constructor Detail

      • Snippet

        public Snippet​(String language,
                       String code)
    • Method Detail

      • getLanguage

        public String getLanguage()
        The programming language of the code.

        This must be formatted as an all lowercase identifier such that syntax highlighters like [Prism](https://prismjs.com/#supported-languages) or [Highlight.js](https://github.com/highlightjs/highlight.js/blob/main/SUPPORTED_LANGUAGES.md) can recognize it. For example: `cpp`, `cs`, `go`, `java`, `javascript`, `php`, `python`, `ruby`, `scala`.

      • getCode

        public String getCode()
        A snippet of code
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object