@Override public SystemProperties with(SystemProperty property) { return add(property); }
@Override public SystemProperties with(SystemProperty property) { return add(property); }
/** * Constructs a {@link SystemProperties} based on the properties defined * in another {@link SystemProperties}. * * @param properties the {@link SystemProperties} on which to base * the new {@link SystemProperties} */ public SystemProperties(SystemProperty... properties) { this(); if (properties != null) { for (SystemProperty property : properties) { add(property); } } }
/** * Constructs a {@link SystemProperties} based on the properties defined * in another {@link SystemProperties}. * * @param properties the {@link SystemProperties} on which to base * the new {@link SystemProperties} */ public SystemProperties(SystemProperty... properties) { this(); if (properties != null) { for (SystemProperty property : properties) { add(property); } } }
/** * Adds the specified {@link SystemProperty} to the {@link SystemProperties}, returning a new * {@link SystemProperties} containing the {@link SystemProperty} * (if and only if a {@link SystemProperty} with the same name doesn't already exist). * * @param property the {@link SystemProperty} to add * * @return the a new {@link SystemProperties} instance, including the existing {@link SystemProperty}s and the new {@link SystemProperty} */ public SystemProperties addIfAbsent(SystemProperty property) { if (property == null || properties.containsKey(property.getName())) { return this; } else { return add(property); } }
/** * Adds the specified {@link SystemProperty} to the {@link SystemProperties}, returning a new * {@link SystemProperties} containing the {@link SystemProperty} * (if and only if a {@link SystemProperty} with the same name doesn't already exist). * * @param property the {@link SystemProperty} to add * * @return the a new {@link SystemProperties} instance, including the existing {@link SystemProperty}s and the new {@link SystemProperty} */ public SystemProperties addIfAbsent(SystemProperty property) { if (property == null || properties.containsKey(property.getName())) { return this; } else { return add(property); } }