Package liqp

Class Insertions

java.lang.Object
liqp.Insertions

public final class Insertions extends Object
An immutable map of Insertions.
Author:
Christian Kohlschütter
  • Field Details

    • EMPTY

      public static final Insertions EMPTY
    • STANDARD_INSERTIONS

      public static final Insertions STANDARD_INSERTIONS
      The standard insertions.
    • JEKYLL_INSERTIONS

      public static final Insertions JEKYLL_INSERTIONS
      The standard insertions.
  • Method Details

    • of

      public static Insertions of(Collection<Insertion> insertions)
      Creates a new Insertions instance with the given insertions.
      Parameters:
      insertions - The insertions to add.
    • of

      public static Insertions of(Insertion... insertions)
      Returns an Insertions instance with the given insertions.
      Parameters:
      insertions - The insertions to add.
    • of

      public static Insertions of(Map<String,Insertion> insertions)
      Returns an Insertions instance with the given insertions.
      Parameters:
      insertions - The insertions to add.
    • mergeWith

      public Insertions mergeWith(Insertions other)
      Returns a new Filters instance that combines this instance with the filters of the other instance. If there are filters with the same name in both instances, then the other filter takes precedence.
      Parameters:
      other - The other Filters instance.
      Returns:
      A new, merged instance.
    • hashCode

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

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • get

      public Insertion get(String name)
      Returns the Insertion registered under the given name, or null if no such Insertion exists in this Insertions instance.
      Parameters:
      name - The name of the Insertion.
      Returns:
      The instance.
    • values

      public Collection<Insertion> values()
      Returns an unmodifiable collection of the stored Insertions.
      Returns:
      The collection.