Summer.Batch.Extra.Utils.LongUtils Class Reference

Long Helper. More...

Static Public Member Functions

static string ToString (long?long1)
 ToString method. More...
 
static int CompareTo (long?long1, long?long2)
 Compare two longs. More...
 
static bool IsGreaterThan (long?long1, long?long2)
 Check if the first given long is greater than the second. More...
 
static bool IsLowerThan (long?long1, long?long2)
 Check if the first given long is lower than the second. More...
 
static long Add (long?long1, long?long2)
 Add two longs. More...
 
static long Add (long?long1, long?long2, long?long3)
 Add three longs. More...
 
static long Add (long?long1, long?long2, long?long3, long?long4)
 Add four longs. More...
 
static long Add (long?long1, long?long2, long?long3, long?long4, long?long5)
 Add five longs. More...
 
static long Substract (long?long1, long?long2)
 Substract two longs. More...
 
static long Multiply (long?long1, long?long2)
 Multiply two longs. More...
 
static long Divide (long?long1, long?long2)
 Divide two longs. More...
 
static bool IsNullOrZeroValue (long?value)
 Check if the given long is zero or null. More...
 

Detailed Description

Long Helper.

Member Function Documentation

static long Summer.Batch.Extra.Utils.LongUtils.Add ( long?  long1,
long?  long2 
)
static

Add two longs.

Parameters
long1long?
long2long?
Returns
the sum of the two arguments, handling null (ex : 3 + null = 3).
static long Summer.Batch.Extra.Utils.LongUtils.Add ( long?  long1,
long?  long2,
long?  long3 
)
static

Add three longs.

Parameters
long1long?
long2long?
long3long?
Returns
the sum of the three arguments, handling null (ex : 3 + 2 + null = 5).
static long Summer.Batch.Extra.Utils.LongUtils.Add ( long?  long1,
long?  long2,
long?  long3,
long?  long4 
)
static

Add four longs.

Parameters
long1long?
long2long?
long3long?
long4long?
Returns
the sum of the four arguments, handling null (ex : 3 + 2 + null = 5).
static long Summer.Batch.Extra.Utils.LongUtils.Add ( long?  long1,
long?  long2,
long?  long3,
long?  long4,
long?  long5 
)
static

Add five longs.

Parameters
long1long?
long2long?
long3long?
long4long?
long5long?
Returns
the sum of the five arguments, handling null (ex : 3 + 2 + null = 5).
static int Summer.Batch.Extra.Utils.LongUtils.CompareTo ( long?  long1,
long?  long2 
)
static

Compare two longs.

Parameters
long1long?
long2long?
Returns
the value 0 if long2 is numerically equal long1; a value less than 0 if this long1 is numerically less than long2; and a value greater than 0 if long1 is numerically greater than long2. Null in case of null argument(s).
static long Summer.Batch.Extra.Utils.LongUtils.Divide ( long?  long1,
long?  long2 
)
static

Divide two longs.

Parameters
long1long?
long2long?
Returns
the division between long1 and long2. Null in case of null argument.
static bool Summer.Batch.Extra.Utils.LongUtils.IsGreaterThan ( long?  long1,
long?  long2 
)
static

Check if the first given long is greater than the second.

Parameters
long1long?
long2long?
Returns
true if long1 is numerically greater than long2. Otherwise false.
static bool Summer.Batch.Extra.Utils.LongUtils.IsLowerThan ( long?  long1,
long?  long2 
)
static

Check if the first given long is lower than the second.

Parameters
long1long?
long2long?
Returns
true if long1 is numerically lower than long2. Otherwise false.
static bool Summer.Batch.Extra.Utils.LongUtils.IsNullOrZeroValue ( long?  value)
static

Check if the given long is zero or null.

Parameters
valuelong?
Returns
true if argument is null or argument == 0.
static long Summer.Batch.Extra.Utils.LongUtils.Multiply ( long?  long1,
long?  long2 
)
static

Multiply two longs.

Parameters
long1long?
long2long?
Returns
the product between long1 and long2. Null in case of null argument.
static long Summer.Batch.Extra.Utils.LongUtils.Substract ( long?  long1,
long?  long2 
)
static

Substract two longs.

Parameters
long1long?
long2long?
Returns
the difference between long1 and long2. Null in case of null argument(s).
static string Summer.Batch.Extra.Utils.LongUtils.ToString ( long?  long1)
static

ToString method.

Parameters
long1long?
Returns
String representation of argument. Empty string if null.

The documentation for this class was generated from the following file:
  • Summer.Batch.Extra/Utils/LongUtils.cs