Top Description Constructors Methods
de.siegmar.fastcsv.util

public final Class Preconditions

extends Object
Class Inheritance
Imports
java.util.function.Supplier

Internal utility class.

It is not a part of the API!

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static void
checkArgument(final boolean
the expression that has to be true
expression
,
final String
the exception message to be thrown
errorMessage
)

Checks the given argument and throws an exception if not met.

public static void
checkArgument(final boolean
the expression that has to be true
expression
,
final Supplier<String>
a supplier for the exception message to be thrown
errorMessageSupplier
)

Checks the given argument and throws an exception if not met.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Preconditionsback to summary
private Preconditions()

Method Detail

checkArgumentback to summary
public static void checkArgument(final boolean expression, final String errorMessage)

Checks the given argument and throws an exception if not met.

Parameters
expression:boolean

the expression that has to be true

errorMessage:String

the exception message to be thrown

Exceptions
IllegalArgumentException:
if the expression is false.
checkArgumentback to summary
public static void checkArgument(final boolean expression, final Supplier<String> errorMessageSupplier)

Checks the given argument and throws an exception if not met.

Parameters
expression:boolean

the expression that has to be true

errorMessageSupplier:Supplier<String>

a supplier for the exception message to be thrown

Annotations
@SuppressWarnings:AnnotateFormatMethod
Exceptions
IllegalArgumentException:
if the expression is false.