Module org.firebirdsql.jaybird
Package org.firebirdsql.jaybird.util

# Class ConditionalHelpers

java.lang.Object
org.firebirdsql.jaybird.util.ConditionalHelpers

public final class ConditionalHelpers extends Object
Helpers for conditional behaviour and conditional expressions.

Since:
  6
Author:
  Mark Rotteveel

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static int`
  `firstNonZero(int firstValue, int secondValue)`
  Returns `firstValue` if it is non-zero, otherwise `secondValue`.
  `static int`
  `firstNonZero(int firstValue, int secondValue, int thirdValue)`
  Returns `firstValue` if it is non-zero, otherwise `secondValue` if it is non-zero, otherwise `thirdValue`.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### firstNonZero

    public static int firstNonZero(int firstValue, int secondValue)
    Returns `firstValue` if it is non-zero, otherwise `secondValue`.
    Parameters:
      `firstValue` - first value
      `secondValue` - second value
    Returns:
      `firstValue` if it is non-zero, otherwise `secondValue`

  - ### firstNonZero

    public static int firstNonZero(int firstValue, int secondValue, int thirdValue)
    Returns `firstValue` if it is non-zero, otherwise `secondValue` if it is non-zero, otherwise `thirdValue`.
    Parameters:
      `firstValue` - first value
      `secondValue` - second value
      `thirdValue` - third value
    Returns:
      `firstValue` if it is non-zero, otherwise `secondValue` if it is non-zero, otherwise `thirdValue`