api/core/src/org/proteios/props/NameReader.java

Code
Comments
Other
Rev Date Author Line
3207 09 Apr 09 gregory 1 /*
3207 09 Apr 09 gregory 2  $Id$
3207 09 Apr 09 gregory 3  
3207 09 Apr 09 gregory 4  Copyright (C) 2007 Gregory Vincic
3207 09 Apr 09 gregory 5  
3207 09 Apr 09 gregory 6  Files are copyright by their respective authors. The contributions to
3207 09 Apr 09 gregory 7  files where copyright is not explicitly stated can be traced with the
3207 09 Apr 09 gregory 8  source code revision system.
3207 09 Apr 09 gregory 9  
3207 09 Apr 09 gregory 10  This file is part of Proteios.
3207 09 Apr 09 gregory 11  Available at http://www.proteios.org/
3207 09 Apr 09 gregory 12  
3207 09 Apr 09 gregory 13  Proteios is free software; you can redistribute it and/or
3207 09 Apr 09 gregory 14  modify it under the terms of the GNU General Public License
3207 09 Apr 09 gregory 15  as published by the Free Software Foundation; either version 2
3207 09 Apr 09 gregory 16  of the License, or (at your option) any later version.
3207 09 Apr 09 gregory 17  
3207 09 Apr 09 gregory 18  Proteios is distributed in the hope that it will be useful,
3207 09 Apr 09 gregory 19  but WITHOUT ANY WARRANTY; without even the implied warranty of
3207 09 Apr 09 gregory 20  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
3207 09 Apr 09 gregory 21  GNU General Public License for more details.
3207 09 Apr 09 gregory 22  
3207 09 Apr 09 gregory 23  You should have received a copy of the GNU General Public License
3207 09 Apr 09 gregory 24  along with this program; if not, write to the Free Software
3207 09 Apr 09 gregory 25  Foundation, Inc., 59 Temple Place - Suite 330,
3207 09 Apr 09 gregory 26  Boston, MA  02111-1307, USA.
3207 09 Apr 09 gregory 27  */
3207 09 Apr 09 gregory 28 package org.proteios.props;
3207 09 Apr 09 gregory 29
3207 09 Apr 09 gregory 30 import org.proteios.core.Nameable;
3207 09 Apr 09 gregory 31
3207 09 Apr 09 gregory 32 /**
3207 09 Apr 09 gregory 33  * Reads the name of a nameable item
3207 09 Apr 09 gregory 34  * 
3207 09 Apr 09 gregory 35  * @author gregory
3207 09 Apr 09 gregory 36  */
3207 09 Apr 09 gregory 37 public class NameReader
3207 09 Apr 09 gregory 38     extends AbstractReader<String, Nameable>
3207 09 Apr 09 gregory 39 {
3207 09 Apr 09 gregory 40   @Override
3207 09 Apr 09 gregory 41   public String getValue(Nameable obj)
3207 09 Apr 09 gregory 42   {
3207 09 Apr 09 gregory 43     return obj.getName();
3207 09 Apr 09 gregory 44   }
3207 09 Apr 09 gregory 45 }