Class Checks


  • public final class Checks
    extends Object
    Various helper methods useful for checking the validity of arguments to spec constructors.
    • Method Detail

      • checkOneNotNullOrEmpty

        public static <T> Property<T> checkOneNotNullOrEmpty​(List<Property<T>> properties)
      • checkAtMostOneNotNull

        public static <T> Property<T> checkAtMostOneNotNull​(Property<T> property1,
                                                            Property<T> property2)
        Returns:
        Non-null value, or first one if both are null. -1 is interpreted as null for historical reasons.
      • checkAtMostOneNotNull

        public static <T> Property<T> checkAtMostOneNotNull​(String name1,
                                                            T value1,
                                                            String name2,
                                                            T value2)
        Returns:
        Non-null value, or first one if both are null. -1 is interpreted as null for historical reasons.