Class PCollections

java.lang.Object
org.sonarsource.analyzer.commons.collections.PCollections

public final class PCollections extends Object
  • Method Details

    • emptySet

      public static <E> PSet<E> emptySet()
      Returns a persistent set containing zero elements.
      Type Parameters:
      E - the PSet's element type
      Returns:
      an empty PSet
    • emptyMap

      public static <E, V> PMap<E,V> emptyMap()
      Returns a persistent map containing zero mappings.
      Type Parameters:
      E - the PMap's key type
      V - the PMap's value type
      Returns:
      an empty PMap
    • emptyStack

      public static <E> PStack<E> emptyStack()
      Returns a persistent stack containing zero elements.
      Type Parameters:
      E - the PStack's element type
      Returns:
      an empty PStack