Class $Gson$Preconditions


  • public final class $Gson$Preconditions
    extends java.lang.Object
    A simple utility class used to check method Preconditions.
     public long divideBy(long value) {
       Preconditions.checkArgument(value != 0);
       return this.value / value;
     }
     
    Author:
    Inderjeet Singh, Joel Leitch
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void checkArgument​(boolean condition)  
      static <T> T checkNotNull​(T obj)  
      • Methods inherited from class java.lang.Object

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

      • checkNotNull

        public static <T> T checkNotNull​(T obj)
      • checkArgument

        public static void checkArgument​(boolean condition)