OLD | NEW |
| (Empty) |
1 part of lisp; | |
2 | |
3 /** | |
4 * An unique symbolic name. | |
5 */ | |
6 class Name { | |
7 | |
8 /** The interned symbols. */ | |
9 static final Map<String, Name> _interned = new HashMap(); | |
10 | |
11 /** Factory for new symbol cells. */ | |
12 factory Name(String name) { | |
13 return _interned.putIfAbsent(name, () => new Name._internal(name)); | |
14 } | |
15 | |
16 /** The name of the symbol. */ | |
17 final String _name; | |
18 | |
19 /** Internal constructor for symbol. */ | |
20 Name._internal(this._name); | |
21 | |
22 /** Returns the string representation of the symbolic name. */ | |
23 String toString() => _name; | |
24 } | |
OLD | NEW |