source: trunk/src/gcc/libjava/javax/naming/NameClassPair.java@ 681

Last change on this file since 681 was 2, checked in by bird, 23 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 1.3 KB
Line 
1/* Copyright (C) 2001 Free Software Foundation
2
3 This file is part of libgcj.
4
5This software is copyrighted work licensed under the terms of the
6Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
7details. */
8
9package javax.naming;
10
11import java.io.Serializable;
12
13/**
14 * @author Tom Tromey <[email protected]>
15 * @date May 16, 2001
16 */
17public class NameClassPair implements Serializable
18{
19 public NameClassPair (String name, String className)
20 {
21 this (name, className, true);
22 }
23
24 public NameClassPair (String name, String className, boolean isRelative)
25 {
26 this.name = name;
27 this.className = className;
28 this.isRel = isRelative;
29 }
30
31 public String getClassName ()
32 {
33 return className;
34 }
35
36 public String getName ()
37 {
38 return name;
39 }
40
41 public boolean isRelative ()
42 {
43 return isRel;
44 }
45
46 public void setClassName (String name)
47 {
48 this.className = name;
49 }
50
51 public void setName (String name)
52 {
53 this.name = name;
54 }
55
56 public void setRelative (boolean r)
57 {
58 this.isRel = r;
59 }
60
61 public String toString ()
62 {
63 // Specified by class documentation.
64 return name + ":" + className;
65 }
66
67 // These field names are fixed by the serialization spec.
68 private String name;
69 private String className;
70 private boolean isRel;
71}
Note: See TracBrowser for help on using the repository browser.