src/jdk.internal.le/share/classes/jdk/internal/jline/internal/Preconditions.java
changeset 53333 fd6de53a0d6e
parent 53332 ab474ef0a0ac
parent 53010 086dfcfc3731
child 53334 b94283cb226b
equal deleted inserted replaced
53332:ab474ef0a0ac 53333:fd6de53a0d6e
     1 /*
       
     2  * Copyright (c) 2002-2016, the original author or authors.
       
     3  *
       
     4  * This software is distributable under the BSD license. See the terms of the
       
     5  * BSD license in the documentation provided with this software.
       
     6  *
       
     7  * http://www.opensource.org/licenses/bsd-license.php
       
     8  */
       
     9 package jdk.internal.jline.internal;
       
    10 
       
    11 // Some bits lifted from Guava's ( http://code.google.com/p/guava-libraries/ ) Preconditions.
       
    12 
       
    13 /**
       
    14  * Preconditions.
       
    15  *
       
    16  * @author <a href="mailto:jason@planet57.com">Jason Dillon</a>
       
    17  * @since 2.7
       
    18  */
       
    19 public class Preconditions
       
    20 {
       
    21     public static <T> T checkNotNull(final T reference) {
       
    22         if (reference == null) {
       
    23             throw new NullPointerException();
       
    24         }
       
    25         return reference;
       
    26     }
       
    27 }