3207 |
09 Apr 09 |
gregory |
1 |
/* |
3207 |
09 Apr 09 |
gregory |
$Id$ |
3207 |
09 Apr 09 |
gregory |
3 |
|
3207 |
09 Apr 09 |
gregory |
Copyright (C) 2007 Gregory Vincic |
3207 |
09 Apr 09 |
gregory |
5 |
|
3207 |
09 Apr 09 |
gregory |
Files are copyright by their respective authors. The contributions to |
3207 |
09 Apr 09 |
gregory |
files where copyright is not explicitly stated can be traced with the |
3207 |
09 Apr 09 |
gregory |
source code revision system. |
3207 |
09 Apr 09 |
gregory |
9 |
|
3207 |
09 Apr 09 |
gregory |
This file is part of Proteios. |
3207 |
09 Apr 09 |
gregory |
Available at http://www.proteios.org/ |
3207 |
09 Apr 09 |
gregory |
12 |
|
3207 |
09 Apr 09 |
gregory |
Proteios is free software; you can redistribute it and/or |
3207 |
09 Apr 09 |
gregory |
modify it under the terms of the GNU General Public License |
3207 |
09 Apr 09 |
gregory |
as published by the Free Software Foundation; either version 2 |
3207 |
09 Apr 09 |
gregory |
of the License, or (at your option) any later version. |
3207 |
09 Apr 09 |
gregory |
17 |
|
3207 |
09 Apr 09 |
gregory |
Proteios is distributed in the hope that it will be useful, |
3207 |
09 Apr 09 |
gregory |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
3207 |
09 Apr 09 |
gregory |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3207 |
09 Apr 09 |
gregory |
GNU General Public License for more details. |
3207 |
09 Apr 09 |
gregory |
22 |
|
3207 |
09 Apr 09 |
gregory |
You should have received a copy of the GNU General Public License |
3207 |
09 Apr 09 |
gregory |
along with this program; if not, write to the Free Software |
3207 |
09 Apr 09 |
gregory |
Foundation, Inc., 59 Temple Place - Suite 330, |
3207 |
09 Apr 09 |
gregory |
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 |
* Reads the name of a nameable item |
3207 |
09 Apr 09 |
gregory |
34 |
* |
3207 |
09 Apr 09 |
gregory |
* @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 |
} |