All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.cowwoc.requirements10.java.validator.component.NegativeNumberComponent Maven / Gradle / Ivy

The newest version!
/*
 * Copyright (c) 2019 Gili Tzabari
 * Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
 */
package com.github.cowwoc.requirements10.java.validator.component;

/**
 * Methods that validators for numbers that may be negative must contain.
 *
 * @param  the type of this validator
 */
public interface NegativeNumberComponent
{
	/**
	 * Ensures that the value is a negative number. {@code -0.0} is considered to be zero *and* negative.
	 *
	 * @return this
	 * @throws NullPointerException     if the value is {@code null}
	 * @throws IllegalArgumentException if the value is:
	 *                                  
    *
  • not negative
  • *
  • not a number
  • *
*/ S isNegative(); /** * Ensures that the value is not a negative number. {@code -0.0} is considered to be zero *and* negative. * * @return this * @throws NullPointerException if the value is {@code null} * @throws IllegalArgumentException if the value is a negative number */ S isNotNegative(); }