Class CollectionAccessorSingleton<T>

java.lang.Object
org.aksw.commons.accessors.CollectionAccessorSingleton<T>
Type Parameters:
T -
All Implemented Interfaces:
CollectionAccessor<T>

public class CollectionAccessorSingleton<T> extends Object implements CollectionAccessor<T>
An accessor that refers to an immutable collection.
Author:
raven May 2, 2018
  • Field Details

    • values

      protected Collection<T> values
    • unmodifiableValuesView

      protected transient Collection<T> unmodifiableValuesView
    • multiplicity

      protected transient com.google.common.collect.Range<Long> multiplicity
  • Constructor Details

    • CollectionAccessorSingleton

      public CollectionAccessorSingleton(T value)
    • CollectionAccessorSingleton

      public CollectionAccessorSingleton(Collection<T> values)
  • Method Details

    • get

      public Collection<T> get()
      Specified by:
      get in interface CollectionAccessor<T>
    • getMultiplicity

      public com.google.common.collect.Range<Long> getMultiplicity()
      Description copied from interface: CollectionAccessor
      Returns the multiplicity of the underlying collection This is the minimum and maximum number of items this collection may hold. If a minimum exists, it is assumed that the collection's iterator yields those immutable entries first.
      Specified by:
      getMultiplicity in interface CollectionAccessor<T>
      Returns: