public static Defaultable<Boolean> bool(boolean defaultValue) { return bool(() -> defaultValue); }
public static Defaultable<Boolean> bool(boolean defaultValue) { return bool(() -> defaultValue); }
/** * Create a <code>Boolean</code> configuration that has a default value of <code>true</code> if all arguments have been explicitly set to non-default values. * * @param items The items to test. * @return The new item. */ public static Defaultable<Boolean> ifAllExplicitlySet(Defaultable<?>... items) { return bool(() -> { for (Defaultable<?> item : items) { if (!item.isExplicit()) { return false; } } return true; }); }
/** * Create a <code>Boolean</code> configuration that has a default value of <code>true</code> if all arguments have been explicitly set to non-default values. * * @param items The items to test. * @return The new item. */ public static Defaultable<Boolean> ifAllExplicitlySet(Defaultable<?>... items) { return bool(() -> { for (Defaultable<?> item : items) { if (!item.isExplicit()) { return false; } } return true; }); }
/** * Create a <code>Boolean</code> configuration that has a default value of <code>true</code> if any arguments have been explicitly set to non-default values. * * @param items The items to test. * @return The new item. */ public static Defaultable<Boolean> ifAnyExplicitlySet(Defaultable<?>... items) { return bool(() -> { for (Defaultable<?> item : items) { if (item.isExplicit()) { return true; } } return false; }); }
/** * Create a <code>Boolean</code> configuration that has a default value of <code>true</code> if any arguments have been explicitly set to non-default values. * * @param items The items to test. * @return The new item. */ public static Defaultable<Boolean> ifAnyExplicitlySet(Defaultable<?>... items) { return bool(() -> { for (Defaultable<?> item : items) { if (item.isExplicit()) { return true; } } return false; }); }