Class PrimitiveDoubleWrapper

All Implemented Interfaces:
NumberWrapper<Double>, Wrapper<Double>

public class PrimitiveDoubleWrapper extends DoubleWrapper
A wrapper for the double class.
  • Constructor Details

    • PrimitiveDoubleWrapper

      public PrimitiveDoubleWrapper()
    • PrimitiveDoubleWrapper

      public PrimitiveDoubleWrapper(double value)
  • Method Details

    • doSet

      protected void doSet(Double value)
      Overrides:
      doSet in class AbstractWrapper<Double>
    • set

      public void set(Number v)
      Description copied from interface: Wrapper
      Sets the value.
      Specified by:
      set in interface NumberWrapper<Double>
      Overrides:
      set in class DoubleWrapper
      Parameters:
      v - the value
    • getDefault

      public Double getDefault()
      Description copied from interface: Wrapper
      Returns the default value.
      Specified by:
      getDefault in interface Wrapper<Double>
      Overrides:
      getDefault in class AbstractWrapper<Double>
      Returns:
      the boxed default value of a primitive type if this is a wrapper for a boxed type, else null
    • isPrimitiveWrapper

      public boolean isPrimitiveWrapper()
      Description copied from interface: Wrapper
      Whether this object is a wrapper for a primitive type.
      Returns:
      true if this object is a wrapper for a primitive type.
    • accept

      public <R, P, Q, TH extends Throwable> R accept(WrapperVisitor<R,P,Q,TH> visitor, P p, Q q) throws TH
      Description copied from interface: Wrapper
      Accept a visitor.
      Specified by:
      accept in interface Wrapper<Double>
      Overrides:
      accept in class DoubleWrapper
      Type Parameters:
      R - The result
      P - The first parameter type
      Q - The second parameter type
      TH - The error or exception type
      Parameters:
      visitor - the visitor
      p - the first parameter
      q - the second parameter
      Returns:
      the result
      Throws:
      TH - the error or exception type