01: package org.geotools.util;
02:
03: import org.opengis.util.MemberName;
04: import org.opengis.util.TypeName;
05:
06: /**
07: * MemberName is used in a Record as part of a Map<MemberName,TypeName>.
08: * <p>
09: * It may be more simple to think of MemberName *as* a Map.Entry - since it
10: * is both the "key" and the "value".
11: * <ul>
12: * <li>key: this
13: * <li>value: associated TypeName
14: * </ul>
15: * This presents a bit of a conflict in that we are never quite sure
16: * what comes first the record or the member during creation time.
17: *
18: * @author Jody
19: */
20: public class MemberNameImpl extends org.geotools.util.LocalName
21: implements MemberName {
22: private static final long serialVersionUID = 6188284973982058318L;
23: private final TypeName typeName;
24:
25: public MemberNameImpl(String name, TypeName typeName) {
26: super (name);
27: this .typeName = typeName;
28: }
29:
30: public MemberNameImpl(CharSequence name, TypeName typeName) {
31: super (name);
32: this .typeName = typeName;
33: }
34:
35: public TypeName getAttributeType() {
36: return typeName;
37: }
38:
39: }
|