Class Validate

java.lang.Object
pcap.common.util.Validate

@Inclubating
public final class Validate
extends Object
Author:
Ardika Rommy Sanjaya
  • Constructor Summary

    Constructors 
    Constructor Description
    Validate()  
  • Method Summary

    Modifier and Type Method Description
    static void notIllegalArgument​(boolean expression)
    Ensures the truth of an expression involving one or more parameters to the calling method.
    static void notIllegalArgument​(boolean expression, String message)
    Ensures the truth of an expression involving one or more parameters to the calling method.
    static <T> T notIllegalArgumentThenReturns​(boolean expression, T reference, T newVal)
    Ensures the truth of an expression involving one or more parameters to the calling method.
    static void notInBounds​(byte[] array, int offset, int length)
    Ensures that given parameter is valid bound in an array.
    static void notInBounds​(char[] array, int offset, int length)
    Ensures that given parameter is valid bound in an array.
    static void notInBounds​(double[] array, int offset, int length)
    Ensures that given parameter is valid bound in an array.
    static void notInBounds​(float[] array, int offset, int length)
    Ensures that given parameter is valid bound in an array.
    static void notInBounds​(int[] array, int offset, int length)
    Ensures that given parameter is valid bound in an array.
    static void notInBounds​(int size, int offset, int length)
    Ensures that given parameter is valid bound.
    static void notInBounds​(long[] array, int offset, int length)
    Ensures that given parameter is valid bound in an array.
    static void notInBounds​(short[] array, int offset, int length)
    Ensures that given parameter is valid bound in an array.
    static <T> void notInBounds​(T[] array, int offset, int length)
    Ensures that given parameter is valid bound in an array.
    static void notNumeric​(String text)
    Deprecated.
    static <T> void nullPointer​(T reference)
    Ensures that given object $reference is not null.
    static <T> void nullPointer​(T reference, String message)
    Ensures that given object $reference is not null.
    static <T> T nullPointerThenReturns​(T reference, T newVal)
    Ensures that given object $reference is not null.

    Methods inherited from class java.lang.Object

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