Class PrimitiveShortWrapper

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

public class PrimitiveShortWrapper extends ShortWrapper
A wrapper for the short class.
  • Constructor Details

    • PrimitiveShortWrapper

      public PrimitiveShortWrapper()
    • PrimitiveShortWrapper

      public PrimitiveShortWrapper(short value)
  • Method Details

    • doSet

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

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

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