Class PrimitiveFloatWrapper

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

public class PrimitiveFloatWrapper extends FloatWrapper
A wrapper for the float class.
  • Constructor Details

    • PrimitiveFloatWrapper

      public PrimitiveFloatWrapper()
    • PrimitiveFloatWrapper

      public PrimitiveFloatWrapper(float value)
  • Method Details

    • doSet

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

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

      public Float getDefault()
      Description copied from interface: Wrapper
      Returns the default value.
      Specified by:
      getDefault in interface Wrapper<Float>
      Overrides:
      getDefault in class AbstractWrapper<Float>
      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<Float>
      Overrides:
      accept in class FloatWrapper
      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