Class ImmutableUtils

java.lang.Object
sootup.core.util.ImmutableUtils

public class ImmutableUtils extends Object
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static <E extends Enum<E>>
    com.google.common.collect.ImmutableSet<E>
    Returns an empty immutable set.
    static <E> com.google.common.collect.ImmutableSet<E>
    Returns an empty immutable list.
    static <E> com.google.common.collect.ImmutableSet<E>
    Returns an empty immutable set.
    static <E extends Enum<E>>
    com.google.common.collect.ImmutableSet<E>
    immutableEnumSet(E anElement, E... otherElements)
    Returns an immutable set instance containing the given enum elements.
    static <E extends Enum<E>>
    com.google.common.collect.ImmutableSet<E>
    Returns an immutable set instance containing the given enum elements.
    static <E> com.google.common.collect.ImmutableList<E>
    Returns an immutable list containing the given elements, in order.
    static <E> com.google.common.collect.ImmutableList<E>
    immutableList(E e1, E e2)
    Returns an immutable list containing the given elements, in order.
    static <E> com.google.common.collect.ImmutableList<E>
    immutableList(E e1, E e2, E e3)
    Returns an immutable list containing the given elements, in order.
    static <E> com.google.common.collect.ImmutableList<E>
    immutableList(E e1, E e2, E e3, E e4)
    Returns an immutable list containing the given elements, in order.
    static <E> com.google.common.collect.ImmutableList<E>
    immutableList(E e1, E e2, E e3, E e4, E e5)
    Returns an immutable list containing the given elements, in order.
    static <E> com.google.common.collect.ImmutableList<E>
    immutableList(E e1, E e2, E e3, E e4, E e5, E e6)
    Returns an immutable list containing the given elements, in order.
    static <E> com.google.common.collect.ImmutableList<E>
    immutableList(E e1, E e2, E e3, E e4, E e5, E e6, E e7)
    Returns an immutable list containing the given elements, in order.
    static <E> com.google.common.collect.ImmutableList<E>
    immutableList(E e1, E e2, E e3, E e4, E e5, E e6, E e7, E e8)
    Returns an immutable list containing the given elements, in order.
    static <E> com.google.common.collect.ImmutableList<E>
    immutableList(E e1, E e2, E e3, E e4, E e5, E e6, E e7, E e8, E e9)
    Returns an immutable list containing the given elements, in order.
    static <E> com.google.common.collect.ImmutableList<E>
    immutableList(E e1, E e2, E e3, E e4, E e5, E e6, E e7, E e8, E e9, E e10)
    Returns an immutable list containing the given elements, in order.
    static <E> com.google.common.collect.ImmutableList<E>
    immutableList(E e1, E e2, E e3, E e4, E e5, E e6, E e7, E e8, E e9, E e10, E e11)
    Returns an immutable list containing the given elements, in order.
    static <E> com.google.common.collect.ImmutableList<E>
    immutableList(E e1, E e2, E e3, E e4, E e5, E e6, E e7, E e8, E e9, E e10, E e11, E e12, E... others)
    Returns an immutable list containing the given elements, in order.
    static <E> com.google.common.collect.ImmutableList<E>
    immutableListOf(E[] elements)
    Returns an immutable list containing the given elements, in order.
    static <E> com.google.common.collect.ImmutableList<E>
    immutableListOf(Iterable<? extends E> elements)
    Returns an immutable list containing the given elements, in order.
    static <E> com.google.common.collect.ImmutableList<E>
    immutableListOf(Stream<? extends E> elements)
    Returns an immutable list containing the given elements, in order.
    static <E> com.google.common.collect.ImmutableSet<E>
    Returns an immutable set instance containing the given enum elements.
    static <E> com.google.common.collect.ImmutableSet<E>
    immutableSet(E e1, E e2)
    Returns an immutable set instance containing the given enum elements.
    static <E> com.google.common.collect.ImmutableSet<E>
    immutableSet(E e1, E e2, E e3)
    Returns an immutable set instance containing the given enum elements.
    static <E> com.google.common.collect.ImmutableSet<E>
    immutableSet(E e1, E e2, E e3, E e4)
    Returns an immutable set instance containing the given enum elements.
    static <E> com.google.common.collect.ImmutableSet<E>
    immutableSet(E e1, E e2, E e3, E e4, E e5)
    Returns an immutable set instance containing the given enum elements.
    static <E> com.google.common.collect.ImmutableSet<E>
    immutableSet(E e1, E e2, E e3, E e4, E e5, E e6)
    Returns an immutable set instance containing the given enum elements.
    static <E> com.google.common.collect.ImmutableSet<E>
    immutableSet(E e1, E e2, E e3, E e4, E e5, E e6, E... others)
    Returns an immutable set instance containing the given enum elements.
    static <E> com.google.common.collect.ImmutableSet<E>
    immutableSetOf(E[] elements)
    Returns an immutable set instance containing the given enum elements.
    static <E> com.google.common.collect.ImmutableSet<E>
    immutableSetOf(Iterable<? extends E> elements)
    Returns an immutable set instance containing the given enum elements.
    static <E> com.google.common.collect.ImmutableSet<E>
    immutableSetOf(Stream<? extends E> elements)
    Returns an immutable set instance containing the given enum elements.

    Methods inherited from class java.lang.Object

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

    • ImmutableUtils

      public ImmutableUtils()
  • Method Details

    • emptyImmutableList

      @Nonnull public static <E> com.google.common.collect.ImmutableSet<E> emptyImmutableList()
      Returns an empty immutable list.
    • immutableList

      @Nonnull public static <E> com.google.common.collect.ImmutableList<E> immutableList(E e1)
      Returns an immutable list containing the given elements, in order.
    • immutableList

      @Nonnull public static <E> com.google.common.collect.ImmutableList<E> immutableList(E e1, E e2)
      Returns an immutable list containing the given elements, in order.
    • immutableList

      @Nonnull public static <E> com.google.common.collect.ImmutableList<E> immutableList(E e1, E e2, E e3)
      Returns an immutable list containing the given elements, in order.
    • immutableList

      @Nonnull public static <E> com.google.common.collect.ImmutableList<E> immutableList(E e1, E e2, E e3, E e4)
      Returns an immutable list containing the given elements, in order.
    • immutableList

      @Nonnull public static <E> com.google.common.collect.ImmutableList<E> immutableList(E e1, E e2, E e3, E e4, E e5)
      Returns an immutable list containing the given elements, in order.
    • immutableList

      @Nonnull public static <E> com.google.common.collect.ImmutableList<E> immutableList(E e1, E e2, E e3, E e4, E e5, E e6)
      Returns an immutable list containing the given elements, in order.
    • immutableList

      @Nonnull public static <E> com.google.common.collect.ImmutableList<E> immutableList(E e1, E e2, E e3, E e4, E e5, E e6, E e7)
      Returns an immutable list containing the given elements, in order.
    • immutableList

      @Nonnull public static <E> com.google.common.collect.ImmutableList<E> immutableList(E e1, E e2, E e3, E e4, E e5, E e6, E e7, E e8)
      Returns an immutable list containing the given elements, in order.
    • immutableList

      @Nonnull public static <E> com.google.common.collect.ImmutableList<E> immutableList(E e1, E e2, E e3, E e4, E e5, E e6, E e7, E e8, E e9)
      Returns an immutable list containing the given elements, in order.
    • immutableList

      @Nonnull public static <E> com.google.common.collect.ImmutableList<E> immutableList(E e1, E e2, E e3, E e4, E e5, E e6, E e7, E e8, E e9, E e10)
      Returns an immutable list containing the given elements, in order.
    • immutableList

      @Nonnull public static <E> com.google.common.collect.ImmutableList<E> immutableList(E e1, E e2, E e3, E e4, E e5, E e6, E e7, E e8, E e9, E e10, E e11)
      Returns an immutable list containing the given elements, in order.
    • immutableList

      @SafeVarargs @Nonnull public static <E> com.google.common.collect.ImmutableList<E> immutableList(E e1, E e2, E e3, E e4, E e5, E e6, E e7, E e8, E e9, E e10, E e11, E e12, @Nonnull E... others)
      Returns an immutable list containing the given elements, in order.
    • immutableListOf

      @Nonnull public static <E> com.google.common.collect.ImmutableList<E> immutableListOf(@Nonnull E[] elements)
      Returns an immutable list containing the given elements, in order.
    • immutableListOf

      @Nonnull public static <E> com.google.common.collect.ImmutableList<E> immutableListOf(@Nonnull Iterable<? extends E> elements)
      Returns an immutable list containing the given elements, in order.
    • immutableListOf

      @Nonnull public static <E> com.google.common.collect.ImmutableList<E> immutableListOf(@Nonnull Stream<? extends E> elements)
      Returns an immutable list containing the given elements, in order.
    • emptyImmutableEnumSet

      @Nonnull public static <E extends Enum<E>> com.google.common.collect.ImmutableSet<E> emptyImmutableEnumSet()
      Returns an empty immutable set.
    • immutableEnumSetOf

      @Nonnull public static <E extends Enum<E>> com.google.common.collect.ImmutableSet<E> immutableEnumSetOf(@Nonnull Iterable<E> elements)
      Returns an immutable set instance containing the given enum elements. Internally, the returned set will be backed by an EnumSet.
    • immutableEnumSet

      @SafeVarargs @Nonnull public static <E extends Enum<E>> com.google.common.collect.ImmutableSet<E> immutableEnumSet(@Nonnull E anElement, @Nonnull E... otherElements)
      Returns an immutable set instance containing the given enum elements. Internally, the returned set will be backed by an EnumSet.
    • emptyImmutableSet

      @Nonnull public static <E> com.google.common.collect.ImmutableSet<E> emptyImmutableSet()
      Returns an empty immutable set.
    • immutableSet

      @Nonnull public static <E> com.google.common.collect.ImmutableSet<E> immutableSet(E e1)
      Returns an immutable set instance containing the given enum elements.
    • immutableSet

      @Nonnull public static <E> com.google.common.collect.ImmutableSet<E> immutableSet(E e1, E e2)
      Returns an immutable set instance containing the given enum elements.
    • immutableSet

      @Nonnull public static <E> com.google.common.collect.ImmutableSet<E> immutableSet(E e1, E e2, E e3)
      Returns an immutable set instance containing the given enum elements.
    • immutableSet

      @Nonnull public static <E> com.google.common.collect.ImmutableSet<E> immutableSet(E e1, E e2, E e3, E e4)
      Returns an immutable set instance containing the given enum elements.
    • immutableSet

      @Nonnull public static <E> com.google.common.collect.ImmutableSet<E> immutableSet(E e1, E e2, E e3, E e4, E e5)
      Returns an immutable set instance containing the given enum elements.
    • immutableSet

      @Nonnull public static <E> com.google.common.collect.ImmutableSet<E> immutableSet(E e1, E e2, E e3, E e4, E e5, E e6)
      Returns an immutable set instance containing the given enum elements.
    • immutableSet

      @SafeVarargs @Nonnull public static <E> com.google.common.collect.ImmutableSet<E> immutableSet(E e1, E e2, E e3, E e4, E e5, E e6, E... others)
      Returns an immutable set instance containing the given enum elements.
    • immutableSetOf

      @Nonnull public static <E> com.google.common.collect.ImmutableSet<E> immutableSetOf(@Nonnull E[] elements)
      Returns an immutable set instance containing the given enum elements.
    • immutableSetOf

      @Nonnull public static <E> com.google.common.collect.ImmutableSet<E> immutableSetOf(@Nonnull Iterable<? extends E> elements)
      Returns an immutable set instance containing the given enum elements.
    • immutableSetOf

      @Nonnull public static <E> com.google.common.collect.ImmutableSet<E> immutableSetOf(@Nonnull Stream<? extends E> elements)
      Returns an immutable set instance containing the given enum elements.