01: package it.unimi.dsi.mg4j.util.parser;
02:
03: /*
04: * MG4J: Managing Gigabytes for Java
05: *
06: * Copyright (C) 2005-2007 Sebastiano Vigna
07: *
08: * This library is free software; you can redistribute it and/or modify it
09: * under the terms of the GNU Lesser General Public License as published by the Free
10: * Software Foundation; either version 2.1 of the License, or (at your option)
11: * any later version.
12: *
13: * This library is distributed in the hope that it will be useful, but
14: * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15: * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
16: * for more details.
17: *
18: * You should have received a copy of the GNU Lesser General Public License
19: * along with this program; if not, write to the Free Software
20: * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21: *
22: */
23:
24: import it.unimi.dsi.lang.MutableString;
25:
26: /** An SGML character entity.
27: * @deprecated Moved to <code>dsiutils</code>.
28: */
29:
30: @Deprecated
31: public final class Entity {
32:
33: /** The name of this entity. */
34: public final CharSequence name;
35: /** The Unicode character corresponding to this entity. */
36: public final char character;
37:
38: /** Creates a new entity with the specified name and character.
39: *
40: * @param name the name of the new entity.
41: * @param character its character value.
42: */
43: public Entity(final CharSequence name, final char character) {
44: this .name = new MutableString(name);
45: this .character = character;
46: }
47:
48: /** Returns the name of this entity.
49: * @return the name of this entity.
50: */
51:
52: public String toString() {
53: return name.toString();
54: }
55: }
|