Package org.agrona

Class Verify

java.lang.Object
org.agrona.Verify

public final class Verify extends Object
Various verification checks to be applied in code.
  • Constructor Details

    • Verify

      private Verify()
  • Method Details

    • notNull

      public static void notNull(Object ref, String name)
      Verify that a reference is not null.
      Parameters:
      ref - to be verified not null.
      name - of the reference to be verified.
    • verifyNull

      public static void verifyNull(Object ref, String name)
      Verify that a reference is null.
      Parameters:
      ref - to be verified as null.
      name - of the reference to be verified.
    • present

      public static void present(Map<?,?> map, Object key, String name)
      Verify that a map contains an entry for a given key.
      Parameters:
      map - to be checked.
      key - to get by.
      name - of entry.
      Throws:
      NullPointerException - if map or key is null
      IllegalStateException - if the entry does not exist.