Package org.agrona

Class Verify


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

      Constructors 
      Modifier Constructor Description
      private Verify()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void notNull​(java.lang.Object ref, java.lang.String name)
      Verify that a reference is not null.
      static void present​(java.util.Map<?,​?> map, java.lang.Object key, java.lang.String name)
      Verify that a map contains an entry for a given key.
      static void verifyNull​(java.lang.Object ref, java.lang.String name)
      Verify that a reference is null.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Verify

        private Verify()
    • Method Detail

      • notNull

        public static void notNull​(java.lang.Object ref,
                                   java.lang.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​(java.lang.Object ref,
                                      java.lang.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​(java.util.Map<?,​?> map,
                                   java.lang.Object key,
                                   java.lang.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:
        java.lang.NullPointerException - if map or key is null
        java.lang.IllegalStateException - if the entry does not exist.