Class LongHelper

java.lang.Object
org.openspaces.core.util.numbers.LongHelper
All Implemented Interfaces:
Comparator<Number>, NumberHelper<Long>

public class LongHelper extends Object implements NumberHelper<Long>
Author:
kimchy
  • Constructor Details

    • LongHelper

      public LongHelper()
  • Method Details

    • compare

      public int compare(Number lhs, Number rhs)
      Specified by:
      compare in interface Comparator<Number>
    • add

      public Long add(Number lhs, Number rhs)
      Description copied from interface: NumberHelper
      Adds the two numbers (can be of any Number type) and returns the type result that the number helper handles.
      Specified by:
      add in interface NumberHelper<Long>
    • sub

      public Long sub(Number lhs, Number rhs)
      Description copied from interface: NumberHelper
      Substracts the two numbers (can be of any Number type) and returns the type result that the number helper handles.
      Specified by:
      sub in interface NumberHelper<Long>
    • mult

      public Long mult(Number lhs, Number rhs)
      Description copied from interface: NumberHelper
      Multiplies the two numbers (can be of any Number type) and returns the type result that the number helper handles.
      Specified by:
      mult in interface NumberHelper<Long>
    • div

      public Long div(Number lhs, Number rhs)
      Description copied from interface: NumberHelper
      Divides the two numbers (can be of any Number type) and returns the type result that the number helper handles.
      Specified by:
      div in interface NumberHelper<Long>
    • MAX_VALUE

      public Long MAX_VALUE()
      Description copied from interface: NumberHelper
      Returns the maximum number for the specific type the number helper handles.
      Specified by:
      MAX_VALUE in interface NumberHelper<Long>
    • MIN_VALUE

      public Long MIN_VALUE()
      Description copied from interface: NumberHelper
      Returns the minimum number for the specific type the number helper handles.
      Specified by:
      MIN_VALUE in interface NumberHelper<Long>
    • ONE

      public Long ONE()
      Description copied from interface: NumberHelper
      Returns the "ONE" value for the given type.
      Specified by:
      ONE in interface NumberHelper<Long>
    • ZERO

      public Long ZERO()
      Description copied from interface: NumberHelper
      Returns the "ZERO" value for the given type.
      Specified by:
      ZERO in interface NumberHelper<Long>
    • cast

      public Long cast(Number n)
      Description copied from interface: NumberHelper
      Casts the give Number into the type the number helper handles.
      Specified by:
      cast in interface NumberHelper<Long>