Use the Preconditions class of the guava library to handle data validation
Guava is an open source-based Java library that contains many of the core libraries that Google is using by many of their projects. This library is designed to facilitate coding and reduce coding errors. This library provides standardization of practical methods for collection, caching, support for primitives, concurrency, common annotations, string handling, Icano and validation-the Guava library is hosted by Google. Efficient-reliable, fast and effective extended JAVA standard library optimization-the Guava library has been highly optimized to look at the source code, you can see that throw exception has been implemented for us. The form of authentication provides a standard fail-safe verification mechanism. In fact, the Guava project contains several core libraries that are widely relied on by Google's Java project, such as: collection [collections], cache [caching], native type support [primitives support], concurrency library [concurrency libraries], general annotation [common annotations], string processing [string processing], IAccord O, and so on. The code of the project only uses part of the PreConditions.