/** * Parse a string representation of a value and returns the correspondig property value. * * @param s the string to parse * @return the corresponding property * @throws NullPointerException if the argument is null * @throws IllegalArgumentException if the string value cannot be parsed for some reason */ public final Property<T> toProperty(String s) throws NullPointerException, IllegalArgumentException { T value = parse(s); return new Property<T>(this, value); }
/** * Set a context property to a new value. If the provided value is null, then the property is removed. * * @param desc the property descriptor * @param value the property value * @param <T> the property parameter type * @throws NullPointerException if the descriptor argument is null */ <T> void setProperty(PropertyDescriptor<T> desc, T value) throws NullPointerException { if (desc == null) { throw new NullPointerException("No null descriptor allowed"); } if (value == null) { log.log(Level.FINE, "Removing property " + desc.name); properties.remove(desc.getName()); } else { Property<T> property = new Property<T>(desc, value); log.log(Level.FINE, "Setting property " + desc.name + " to value " + property.getValue()); properties.put(desc.getName(), property); } }
/** * Parse a string representation of a value and returns the correspondig property value. * * @param s the string to parse * @return the corresponding property * @throws NullPointerException if the argument is null * @throws IllegalArgumentException if the string value cannot be parsed for some reason */ public final Property<T> toProperty(String s) throws NullPointerException, IllegalArgumentException { T value = parse(s); return new Property<T>(this, value); }
/** * Parse a string representation of a value and returns the correspondig property value. * * @param s the string to parse * @return the corresponding property * @throws NullPointerException if the argument is null * @throws IllegalArgumentException if the string value cannot be parsed for some reason */ public final Property<T> toProperty(String s) throws NullPointerException, IllegalArgumentException { T value = parse(s); return new Property<T>(this, value); }
/** * Parse a string representation of a value and returns the correspondig property value. * * @param s the string to parse * @return the corresponding property * @throws NullPointerException if the argument is null * @throws IllegalArgumentException if the string value cannot be parsed for some reason */ public final Property<T> toProperty(String s) throws NullPointerException, IllegalArgumentException { T value = parse(s); return new Property<T>(this, value); }
/** * Set a context property to a new value. If the provided value is null, then the property is removed. * * @param desc the property descriptor * @param value the property value * @param <T> the property parameter type * @throws NullPointerException if the descriptor argument is null */ <T> void setProperty(PropertyDescriptor<T> desc, T value) throws NullPointerException { if (desc == null) { throw new NullPointerException("No null descriptor allowed"); } if (value == null) { log.log(Level.FINE, "Removing property " + desc.name); properties.remove(desc.getName()); } else { Property<T> property = new Property<T>(desc, value); log.log(Level.FINE, "Setting property " + desc.name + " to value " + property.getValue()); properties.put(desc.getName(), property); } }
/** * Set a context property to a new value. If the provided value is null, then the property is removed. * * @param desc the property descriptor * @param value the property value * @param <T> the property parameter type * @throws NullPointerException if the descriptor argument is null */ <T> void setProperty(PropertyDescriptor<T> desc, T value) throws NullPointerException { if (desc == null) { throw new NullPointerException("No null descriptor allowed"); } if (value == null) { log.log(Level.FINE, "Removing property " + desc.name); properties.remove(desc.getName()); } else { Property<T> property = new Property<T>(desc, value); log.log(Level.FINE, "Setting property " + desc.name + " to value " + property.getValue()); properties.put(desc.getName(), property); } }
/** * Set a context property to a new value. If the provided value is null, then the property is removed. * * @param desc the property descriptor * @param value the property value * @param <T> the property parameter type * @throws NullPointerException if the descriptor argument is null */ <T> void setProperty(PropertyDescriptor<T> desc, T value) throws NullPointerException { if (desc == null) { throw new NullPointerException(); } if (value == null) { log.log(Level.FINE, "Removing property " + desc.name); properties.remove(desc.getName()); } else { Property<T> property = new Property<T>(desc, value); log.log(Level.FINE, "Setting property " + desc.name + " to value " + property.getValue()); properties.put(desc.getName(), property); } }