View Javadoc

1   // $Id: Accessor.java 165 2009-05-28 21:46:38Z agony $
2   /*
3    * xsAnalyzer - XML schema analyzing tool. Copyright (C) 2008 Michael Engelhardt
4    * 
5    * This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public
6    * License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later
7    * version.
8    * 
9    * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
10   * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
11   * 
12   * You should have received a copy of the GNU General Public License along with this program; if not, write to the Free
13   * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
14   */
15  /**
16   * 
17   */
18  package de.mindcrimeilab.util;
19  
20  /**
21   * Interface to access wrapped values where {@code V} is the value and {@code C} is the class of the object to get the
22   * value from.
23   * 
24   * @author Michael Engelhardt<me@mindcrime-ilab.de>
25   * @author $Author: agony $
26   * @version $Revision: 165 $
27   * 
28   */
29  public interface Accessor<V, C> {
30  
31      /**
32       * Retrun value {@code V} from given {@code object} of class {@code C}
33       * 
34       * @param object
35       *            of type {@code C} to get object from.
36       * @return instance of {@code V}
37       */
38      public V getValue(C object);
39  }