Class IdentityStyle

  • All Implemented Interfaces:
    Style

    class IdentityStyle
    extends java.lang.Object
    implements Style
    The IdentityStyle object is used to represent a style that does not modify the tokens passed in to it. This is used if there is no style specified or if there is no need to convert the XML elements an attributes to a particular style. This is also the most performant style as it does not require cache lookups.
    • Constructor Summary

      Constructors 
      Constructor Description
      IdentityStyle()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getAttribute​(java.lang.String name)
      This is basically a pass through method.
      java.lang.String getElement​(java.lang.String name)
      This is basically a pass through method.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • IdentityStyle

        IdentityStyle()
    • Method Detail

      • getAttribute

        public java.lang.String getAttribute​(java.lang.String name)
        This is basically a pass through method. It will return the same string as is passed in to it. This ensures the best performant when no styling is required for the XML document.
        Specified by:
        getAttribute in interface Style
        Parameters:
        name - this is the token that is to be styled by this
        Returns:
        this returns the same string that is passed in
      • getElement

        public java.lang.String getElement​(java.lang.String name)
        This is basically a pass through method. It will return the same string as is passed in to it. This ensures the best performant when no styling is required for the XML document.
        Specified by:
        getElement in interface Style
        Parameters:
        name - this is the token that is to be styled by this
        Returns:
        this returns the same string that is passed in