public static Year randomYear(Year startInclusive, Year endExclusive) {
    checkArgument(startInclusive != null, "Start must be non-null");
    checkArgument(endExclusive != null, "End must be non-null");
    return randomYear(startInclusive.getValue(), endExclusive.getValue());
  }
public static Year randomYear ( Year startInclusive , Year endExclusive ) { checkArgument ( startInclusive != null , "Start must be non-null" ) ; checkArgument ( endExclusive != null , "End must be non-null" ) ; return randomYear ( startInclusive . getValue ( ) , endExclusive . getValue ( ) ) ; }
Returns a random {@link Year} within the specified range.

@param startInclusive the earliest {@link Year} that can be returned
@param endExclusive the upper bound (not included)
@return the random {@link Year}
@throws IllegalArgumentException if startInclusive or endExclusive are null, if endExclusive is
earlier than startInclusive, if either are before {@link RandomDateUtils#MIN_INSTANT}, or
if either are after {@link RandomDateUtils#MAX_INSTANT}