| | |
| | | } |
| | | |
| | | // The properties. |
| | | private final Map<PropertyDefinition, MyProperty> properties; |
| | | private final Map<PropertyDefinition<?>, MyProperty<?>> properties; |
| | | |
| | | |
| | | |
| | |
| | | * Creates a new empty property set. |
| | | */ |
| | | public PropertySet() { |
| | | this.properties = new HashMap<PropertyDefinition, MyProperty>(); |
| | | this.properties = new HashMap<PropertyDefinition<?>, MyProperty<?>>(); |
| | | } |
| | | |
| | | |
| | |
| | | throw new IllegalArgumentException("Unknown property " + d.getName()); |
| | | } |
| | | |
| | | return properties.get(d); |
| | | return (Property<T>) properties.get(d); |
| | | } |
| | | |
| | | |
| | |
| | | public String toString() { |
| | | StringBuilder builder = new StringBuilder(); |
| | | builder.append('{'); |
| | | for (Map.Entry<PropertyDefinition, MyProperty> entry : properties |
| | | for (Map.Entry<PropertyDefinition<?>, MyProperty<?>> entry : properties |
| | | .entrySet()) { |
| | | builder.append(entry.getKey().getName()); |
| | | builder.append('='); |