Here you can find the source of assertNonNegative(int field, String fieldName)
public static void assertNonNegative(int field, String fieldName)
//package com.java2s; //License from project: Apache License public class Main { public static void assertNonNegative(int field, String fieldName) { if (field < 0) { throw new IllegalArgumentException(fieldName + " must be equal to or greater than zero"); }/*from w ww . jav a 2s . c om*/ } public static void assertNonNegative(long field, String fieldName) { if (field < 0) { throw new IllegalArgumentException(fieldName + " must be equal to or greater than zero"); } } }