@Override public final Map<PropertyDescriptorField, String> attributeValuesById() { Map<PropertyDescriptorField, String> values = new HashMap<>(); addAttributesTo(values); return values; }
/** * Constructor for an abstract property. * * @param theName Name of the property * @param theDescription Description * @param theUIOrder UI order * * @throws IllegalArgumentException If name or description are empty, or UI order is negative. */ protected AbstractProperty(String theName, String theDescription, float theUIOrder, boolean isDefinedExternally) { if (theUIOrder < 0) { throw new IllegalArgumentException("Property attribute 'UI order' cannot be null or blank"); } name = checkNotEmpty(theName, NAME); description = checkNotEmpty(theDescription, DESCRIPTION); uiOrder = theUIOrder; this.isDefinedExternally = isDefinedExternally; }
/** * Adds this property's attributes to the map. Subclasses can override this to add more {@link * PropertyDescriptorField}. * * @param attributes The map to fill */ protected void addAttributesTo(Map<PropertyDescriptorField, String> attributes) { attributes.put(NAME, name); attributes.put(DESCRIPTION, description); attributes.put(DEFAULT_VALUE, defaultAsString()); }
@Override public String toString() { return "[PropertyDescriptor: name=" + name() + ',' + " type=" + (isMultiValue() ? "List<" + type() + '>' : type()) + ',' + " value=" + defaultValue() + ']'; }
@Override public String toString() { return "[PropertyDescriptor: name=" + name() + ',' + " type=" + (isMultiValue() ? "List<" + type() + '>' : type()) + ',' + " value=" + defaultValue() + ']'; }
@Override protected void addAttributesTo(Map<PropertyDescriptorField, String> attributes) { super.addAttributesTo(attributes); attributes.put(PropertyDescriptorField.DELIMITER, Character.toString(multiValueDelimiter())); }
/** * Adds this property's attributes to the map. Subclasses can override this to add more {@link * PropertyDescriptorField}. * * @param attributes The map to fill */ protected void addAttributesTo(Map<PropertyDescriptorField, String> attributes) { attributes.put(NAME, name); attributes.put(DESCRIPTION, description); attributes.put(DEFAULT_VALUE, defaultAsString()); }
/** * Constructor for an abstract property. * * @param theName Name of the property * @param theDescription Description * @param theUIOrder UI order * * @throws IllegalArgumentException If name or description are empty, or UI order is negative. */ protected AbstractProperty(String theName, String theDescription, float theUIOrder, boolean isDefinedExternally) { if (theUIOrder < 0) { throw new IllegalArgumentException("Property attribute 'UI order' cannot be null or blank"); } name = checkNotEmpty(theName, NAME); description = checkNotEmpty(theDescription, DESCRIPTION); uiOrder = theUIOrder; this.isDefinedExternally = isDefinedExternally; }
@Override public final Map<PropertyDescriptorField, String> attributeValuesById() { Map<PropertyDescriptorField, String> values = new HashMap<>(); addAttributesTo(values); return values; }
@Override protected void addAttributesTo(Map<PropertyDescriptorField, String> attributes) { super.addAttributesTo(attributes); attributes.put(PropertyDescriptorField.DELIMITER, Character.toString(multiValueDelimiter())); }