Class MicroProps

java.lang.Object
com.ibm.icu.impl.number.MicroProps
All Implemented Interfaces:
MicroPropsGenerator, Cloneable

public class MicroProps extends Object implements Cloneable, MicroPropsGenerator
MicroProps is the first MicroPropsGenerator that should be should be called, producing an initialized MicroProps instance that will be passed on and modified throughout the rest of the chain of MicroPropsGenerator instances.
  • Field Details

  • Constructor Details

    • MicroProps

      public MicroProps(boolean immutable)
      Parameters:
      immutable - Whether this MicroProps should behave as an immutable after construction with respect to the quantity chain.
  • Method Details

    • processQuantity

      public MicroProps processQuantity(DecimalQuantity quantity)
      As MicroProps is the "base instance", this implementation of MircoPropsGenerator.processQuantity() just ensures that the output micros is correctly initialized.

      For the "safe" invocation of this function, micros must not be *this, such that a copy of the base instance is made. For the "unsafe" path, this function can be used only once, because the base MicroProps instance will be modified and thus not be available for re-use.

      Specified by:
      processQuantity in interface MicroPropsGenerator
      Parameters:
      quantity - The quantity for consideration and optional mutation.
      Returns:
      an initialized MicroProps instance.
    • clone

      public Object clone()
      Overrides:
      clone in class Object