Interface IsBuilder

    • Method Detail

      • isValid

        static boolean isValid​(IsBuilder builder)
        Returns true if the builder haven't been invoked yet to create the object.
        Parameters:
        builder - builder instance to be checked
        Returns:
        true if the builder haven't been invoked yet to create the object
      • checkIfValid

        static void checkIfValid​(IsBuilder builder)
        Checks if the builder haven't been invoked yet to create the object.
        If not, throw a IllegalArgumentException.
        Parameters:
        builder - builder instance to be checked
      • checkAndGetIfValid

        static <T extends IsBuilder> T checkAndGetIfValid​(T builder)
        Checks if the builder haven't been invoked yet to create the object.
        If not, throw a IllegalArgumentException, otherwise it returns the builder.
        Type Parameters:
        T - type of key
        Parameters:
        builder - builder instance to be checked
        Returns:
        the same key passed as argument
      • isBuilt

        boolean isBuilt()
        Returns true if new object has been already created by the builder.
        Returns:
        true if new object has been already created by the builder