Class Interpolation


  • public class Interpolation
    extends Object
    A sequence with alternating string fragments and HTL expressions. These result from parsing HTML attributes or string nodes. For instance "Hello ${World}!" would result in 3 fragments: "Hello ", ${World} and "!"
    • Constructor Detail

      • Interpolation

        public Interpolation()
    • Method Detail

      • addFragment

        public void addFragment​(Fragment fragment)
      • addExpression

        public void addExpression​(Expression expression)
      • addText

        public void addText​(String text)
      • setContent

        public void setContent​(String content)
      • size

        public int size()
        Get the number of fragments
        Returns:
        the number of fragments
      • getFragment

        public Fragment getFragment​(int index)
        Return the fragment with the specified index
        Parameters:
        index - - the index of the fragments. must be less than the size of the interpolation
        Returns:
        - the specified fragment
        Throws:
        IndexOutOfBoundsException - - if the index is negative or greater or equal than size
      • getContent

        public String getContent()