Klasse ByteCollections

java.lang.Object
speiger.src.collections.bytes.utils.ByteCollections

public class ByteCollections extends Object
A Helper class for Collections
  • Felddetails

    • EMPTY

      public static final ByteCollection EMPTY
      Empty Collection Reference
  • Konstruktordetails

    • ByteCollections

      public ByteCollections()
  • Methodendetails

    • empty

      public static ByteCollection empty()
      Returns a Immutable EmptyCollection instance that is automatically casted.
      Gibt zurück:
      an empty collection
    • unmodifiable

      public static ByteCollection unmodifiable(ByteCollection c)
      Returns a Immutable Collection instance based on the instance given.
      Parameter:
      c - that should be made immutable/unmodifiable
      Gibt zurück:
      a unmodifiable collection wrapper. If the Collection already a unmodifiable wrapper then it just returns itself.
    • synchronize

      public static ByteCollection synchronize(ByteCollection c)
      Returns a synchronized Collection instance based on the instance given.
      Parameter:
      c - that should be synchronized
      Gibt zurück:
      a synchronized collection wrapper. If the Collection already a synchronized wrapper then it just returns itself.
    • synchronize

      public static ByteCollection synchronize(ByteCollection c, Object mutex)
      Returns a synchronized Collection instance based on the instance given.
      Parameter:
      c - that should be synchronized
      mutex - is the controller of the synchronization block.
      Gibt zurück:
      a synchronized collection wrapper. If the Collection already a synchronized wrapper then it just returns itself.
    • singleton

      public static ByteCollection singleton(byte element)
      Creates a Singleton Collection of a given element
      Parameter:
      element - the element that should be converted into a singleton collection
      Gibt zurück:
      a singletoncollection of the given element