Class CssQuotes

java.lang.Object
com.itextpdf.styledxmlparser.css.resolve.CssQuotes

public class CssQuotes extends Object
Helper class to deal with quoted values in strings.
  • Field Details

  • Constructor Details

    • CssQuotes

      private CssQuotes(ArrayList<String> openQuotes, ArrayList<String> closeQuotes)
      Creates a new CssQuotes instance.
      Parameters:
      openQuotes - the open quotes
      closeQuotes - the close quotes
  • Method Details

    • createQuotes

      public static CssQuotes createQuotes(String quotesString, boolean fallbackToDefault)
      Creates a CssQuotes instance.
      Parameters:
      quotesString - the quotes string
      fallbackToDefault - indicates whether it's OK to fall back to the default
      Returns:
      the resulting CssQuotes instance
    • createDefaultQuotes

      public static CssQuotes createDefaultQuotes()
      Creates the default CssQuotes instance.
      Returns:
      the CssQuotes instance
    • resolveQuote

      public String resolveQuote(String value, AbstractCssContext context)
      Resolves quotes.
      Parameters:
      value - the value
      context - the CSS context
      Returns:
      the quote string
    • increaseDepth

      private void increaseDepth(AbstractCssContext context)
      Increases the quote depth.
      Parameters:
      context - the context
    • decreaseDepth

      private void decreaseDepth(AbstractCssContext context)
      Decreases the quote depth.
      Parameters:
      context - the context
    • getQuote

      private String getQuote(int depth, ArrayList<String> quotes)
      Gets the quote.
      Parameters:
      depth - the depth
      quotes - the quotes
      Returns:
      the requested quote string