jdk Sdiff src/share/classes/com/sun/security/auth (original) (raw)
70 (sun.security.util.ResourcesMgr.getString
71 ("invalid.null.input.value",
72 "sun.security.util.AuthResources"));
73 Object[] source = {"name"};
74 throw new NullPointerException(form.format(source));
75 }
76
77 this.name = name;
78 }
79
80 /**
81 * Create a UnixNumericUserPrincipal
using a
82 * long representation of the user's identification number (UID).
83 *
84 *
85 *
86 * @param name the user identification number (UID) for this user
87 * represented as a long.
88 /
89 public UnixNumericUserPrincipal(long name) {
90 this.name = (new Long(name)).toString();
91 }
92
93 /*
94 * Return the user identification number (UID) for this
95 * UnixNumericUserPrincipal
.
96 *
97 *
98 *
99 * @return the user identification number (UID) for this
100 * UnixNumericUserPrincipal
101 /
102 public String getName() {
103 return name;
104 }
105
106 /*
107 * Return the user identification number (UID) for this
108 * UnixNumericUserPrincipal
as a long.
109 *
110 *
111 *
112 * @return the user identification number (UID) for this
113 * UnixNumericUserPrincipal
as a long.
114 /
115 public long longValue() {
116 return ((new Long(name)).longValue());
117 }
118
119 /*
120 * Return a string representation of this
121 * UnixNumericUserPrincipal
.
122 *
123 *
124 *
125 * @return a string representation of this
126 * UnixNumericUserPrincipal
.
127 */
128 public String toString() {
129 java.text.MessageFormat form = new java.text.MessageFormat
130 (sun.security.util.ResourcesMgr.getString
131 ("UnixNumericUserPrincipal.name",
132 "sun.security.util.AuthResources"));
133 Object[] source = {name};
134 return form.format(source);
135 }
136
70 (sun.security.util.ResourcesMgr.getString
71 ("invalid.null.input.value",
72 "sun.security.util.AuthResources"));
73 Object[] source = {"name"};
74 throw new NullPointerException(form.format(source));
75 }
76
77 this.name = name;
78 }
79
80 /**
81 * Create a UnixNumericUserPrincipal
using a
82 * long representation of the user's identification number (UID).
83 *
84 *
85 *
86 * @param name the user identification number (UID) for this user
87 * represented as a long.
88 /
89 public UnixNumericUserPrincipal(long name) {
90 this.name = Long.toString(name);
91 }
92
93 /*
94 * Return the user identification number (UID) for this
95 * UnixNumericUserPrincipal
.
96 *
97 *
98 *
99 * @return the user identification number (UID) for this
100 * UnixNumericUserPrincipal
101 /
102 public String getName() {
103 return name;
104 }
105
106 /*
107 * Return the user identification number (UID) for this
108 * UnixNumericUserPrincipal
as a long.
109 *
110 *
111 *
112 * @return the user identification number (UID) for this
113 * UnixNumericUserPrincipal
as a long.
114 /
115 public long longValue() {
116 return Long.parseLong(name);
117 }
118
119 /*
120 * Return a string representation of this
121 * UnixNumericUserPrincipal
.
122 *
123 *
124 *
125 * @return a string representation of this
126 * UnixNumericUserPrincipal
.
127 */
128 public String toString() {
129 java.text.MessageFormat form = new java.text.MessageFormat
130 (sun.security.util.ResourcesMgr.getString
131 ("UnixNumericUserPrincipal.name",
132 "sun.security.util.AuthResources"));
133 Object[] source = {name};
134 return form.format(source);
135 }
136