BrightSide Workbench Full Report + Source Code
org.turro.math.Zero Class Reference

Static Public Member Functions

static boolean orNull (Number value)
 
static boolean near (double value, int digits)
 
static boolean near (Object value, int digits)
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 24 of file Zero.java.

Member Function Documentation

◆ near() [1/2]

static boolean org.turro.math.Zero.near ( double  value,
int  digits 
)
static

Definition at line 30 of file Zero.java.

30  {
31  double range = 1 / Math.pow(10.0, digits);
32  return value < range && value > -range;
33  }
Here is the caller graph for this function:

◆ near() [2/2]

static boolean org.turro.math.Zero.near ( Object  value,
int  digits 
)
static

Definition at line 35 of file Zero.java.

35  {
36  if(value instanceof Number) {
37  return near(((Number) value).doubleValue(), digits);
38  }
39  return true;
40  }
static boolean near(double value, int digits)
Definition: Zero.java:30
Here is the call graph for this function:

◆ orNull()

static boolean org.turro.math.Zero.orNull ( Number  value)
static

Definition at line 26 of file Zero.java.

26  {
27  return value == null || value.longValue() == 0L;
28  }
Here is the caller graph for this function:

The documentation for this class was generated from the following file: