java.lang.Object
speiger.src.collections.booleans.utils.BooleanLists

public class BooleanLists extends Object
A Helper class for Lists
  • Konstruktordetails

    • BooleanLists

      public BooleanLists()
  • Methodendetails

    • empty

      public static speiger.src.collections.booleans.utils.BooleanLists.EmptyList empty()
      Returns a Immutable EmptyList instance that is automatically casted.
      Gibt zurück:
      an empty list
    • unmodifiable

      public static BooleanList unmodifiable(BooleanList l)
      Returns a Immutable List instance based on the instance given.
      Parameter:
      l - that should be made immutable/unmodifiable
      Gibt zurück:
      a unmodifiable list wrapper. If the list is implementing RandomAccess that is also transferred. If the List already a unmodifiable wrapper then it just returns itself.
    • synchronize

      public static BooleanList synchronize(BooleanList l)
      Returns a synchronized List instance based on the instance given.
      Parameter:
      l - that should be synchronized
      Gibt zurück:
      a synchronized list wrapper. If the list is implementing RandomAccess or IBooleanArray that is also transferred. If the List already a synchronized wrapper then it just returns itself.
    • synchronize

      public static BooleanList synchronize(BooleanList l, Object mutex)
      Returns a synchronized List instance based on the instance given.
      Parameter:
      l - that should be synchronized
      mutex - is the controller of the synchronization block.
      Gibt zurück:
      a synchronized list wrapper. If the list is implementing RandomAccess or IBooleanArray that is also transferred. If the List already a synchronized wrapper then it just returns itself.
    • singleton

      public static BooleanList singleton(boolean element)
      Creates a Unmodifiable Singleton list
      Parameter:
      element - that should be used in the Singleton
      Gibt zurück:
      a singleton list that is unmodifiable
    • reverse

      public static BooleanList reverse(BooleanList list)
      Reverses the list
      Parameter:
      list - that should be reversed.
      Gibt zurück:
      the input list
    • shuffle

      public static BooleanList shuffle(BooleanList list)
      Shuffles the list
      Parameter:
      list - that should be Shuffled.
      Gibt zurück:
      the input list
    • shuffle

      public static BooleanList shuffle(BooleanList list, RandomGenerator random)
      Shuffles the list
      Parameter:
      list - that should be Shuffled.
      random - the random that should be used
      Gibt zurück:
      the input list