001 // License: GPL. For details, see LICENSE file.
002 package org.openstreetmap.josm.tools;
003
004 /**
005 * Small interface to define a property with both read and write access.
006 */
007 public interface Property<ObjectType, PropertyType> {
008 /**
009 * Get the value of the property.
010 * @param obj the object, from that the property is derived
011 * @return the value of the property for the object obj
012 */
013 public PropertyType get(ObjectType obj);
014 /**
015 * Set the value of the property for the object.
016 * @param obj the object for that the property should be set
017 * @param value the value the property is set to
018 */
019 public void set(ObjectType obj, PropertyType value);
020 }