/** * Removes the specified {@link SystemProperty} named property from the {@link SystemProperties}, returning a new * {@link SystemProperties} without the said {@link SystemProperty}. * * @param propertyName the {@link SystemProperty} to remove * * @return the a new {@link SystemProperties} instance, excluding the specified {@link SystemProperty} */ public SystemProperties remove(String propertyName) { if (propertyName == null || propertyName.isEmpty() ||!contains(propertyName)) { return this; } else { SystemProperties systemProperties = new SystemProperties(this); systemProperties.properties.remove(propertyName); return systemProperties; } }
/** * Removes the specified {@link SystemProperty} named property from the {@link SystemProperties}, returning a new * {@link SystemProperties} without the said {@link SystemProperty}. * * @param propertyName the {@link SystemProperty} to remove * * @return the a new {@link SystemProperties} instance, excluding the specified {@link SystemProperty} */ public SystemProperties remove(String propertyName) { if (propertyName == null || propertyName.isEmpty() ||!contains(propertyName)) { return this; } else { SystemProperties systemProperties = new SystemProperties(this); systemProperties.properties.remove(propertyName); return systemProperties; } }