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