Class LabeledIntMapSupplier<C extends LabeledIntMap>

java.lang.Object
it.univr.di.labeledvalue.LabeledIntMapSupplier<C>
Type Parameters:
C - implementation class of LabeledIntMap interface.
All Implemented Interfaces:
com.google.common.base.Supplier<C>, Supplier<C>

public final class LabeledIntMapSupplier<C extends LabeledIntMap> extends Object implements com.google.common.base.Supplier<C>
Basic factory of LabeledIntMap objects. An implementation C must be provided.
Version:
$Rev: 852 $
Author:
posenato
  • Field Details

    • DEFAULT_LABELEDINTMAP_CLASS

      public static final Class<? extends LabeledIntMap> DEFAULT_LABELEDINTMAP_CLASS
    • SIMPLE_LABELEDINTMAP_CLASS

      public static final Class<? extends LabeledIntMap> SIMPLE_LABELEDINTMAP_CLASS
  • Constructor Details

    • LabeledIntMapSupplier

      public LabeledIntMapSupplier(Class<C> implementationClass)
      Constructor for LabeledIntMapSupplier.
      Parameters:
      implementationClass - a Class object.
  • Method Details

    • get

      public C get()
      Specified by:
      get in interface com.google.common.base.Supplier<C extends LabeledIntMap>
      Specified by:
      get in interface Supplier<C extends LabeledIntMap>
    • get

      public C get(boolean optimize)
      Parameters:
      optimize - false if the labels have not to shorten.
      Returns:
      a new instance
    • get

      public C get(LabeledIntMap lim)
      Parameters:
      lim - a LabeledIntMap object.
      Returns:
      a new LabeledIntMap object that is an independent copy of 'lim'.
    • get

      public C get(LabeledIntMap lim, boolean optimize)
      Parameters:
      lim - a LabeledIntMap object.
      optimize - false if the labels have not to shorten.
      Returns:
      a new instance
    • getReturnedObjectClass

      public Class<C> getReturnedObjectClass()
      Returns:
      a Class object.
    • toString

      public String toString()
      Overrides:
      toString in class Object