93 throw new NullPointerException(rb.getString("provided.null.name"));
94
95 this.name = name;
96 this.primaryGroup = primaryGroup;
97 }
98
99 /**
100 * Create a <code>SolarisNumericGroupPrincipal</code> using a
101 * long representation of the user's group identification number (GID).
102 *
103 * <p>
104 *
105 * @param name the user's group identification number (GID) for this user
106 * represented as a long. <p>
107 *
108 * @param primaryGroup true if the specified GID represents the
109 * primary group to which this user belongs.
110 *
111 */
112 public SolarisNumericGroupPrincipal(long name, boolean primaryGroup) {
113 this.name = (new Long(name)).toString();
114 this.primaryGroup = primaryGroup;
115 }
116
117 /**
118 * Return the user's group identification number (GID) for this
119 * <code>SolarisNumericGroupPrincipal</code>.
120 *
121 * <p>
122 *
123 * @return the user's group identification number (GID) for this
124 * <code>SolarisNumericGroupPrincipal</code>
125 */
126 public String getName() {
127 return name;
128 }
129
130 /**
131 * Return the user's group identification number (GID) for this
132 * <code>SolarisNumericGroupPrincipal</code> as a long.
133 *
134 * <p>
135 *
136 * @return the user's group identification number (GID) for this
137 * <code>SolarisNumericGroupPrincipal</code> as a long.
138 */
139 public long longValue() {
140 return ((new Long(name)).longValue());
141 }
142
143 /**
144 * Return whether this group identification number (GID) represents
145 * the primary group to which this user belongs.
146 *
147 * <p>
148 *
149 * @return true if this group identification number (GID) represents
150 * the primary group to which this user belongs,
151 * or false otherwise.
152 */
153 public boolean isPrimaryGroup() {
154 return primaryGroup;
155 }
156
157 /**
158 * Return a string representation of this
159 * <code>SolarisNumericGroupPrincipal</code>.
160 *
|
93 throw new NullPointerException(rb.getString("provided.null.name"));
94
95 this.name = name;
96 this.primaryGroup = primaryGroup;
97 }
98
99 /**
100 * Create a <code>SolarisNumericGroupPrincipal</code> using a
101 * long representation of the user's group identification number (GID).
102 *
103 * <p>
104 *
105 * @param name the user's group identification number (GID) for this user
106 * represented as a long. <p>
107 *
108 * @param primaryGroup true if the specified GID represents the
109 * primary group to which this user belongs.
110 *
111 */
112 public SolarisNumericGroupPrincipal(long name, boolean primaryGroup) {
113 this.name = Long.valueOf(name).toString();
114 this.primaryGroup = primaryGroup;
115 }
116
117 /**
118 * Return the user's group identification number (GID) for this
119 * <code>SolarisNumericGroupPrincipal</code>.
120 *
121 * <p>
122 *
123 * @return the user's group identification number (GID) for this
124 * <code>SolarisNumericGroupPrincipal</code>
125 */
126 public String getName() {
127 return name;
128 }
129
130 /**
131 * Return the user's group identification number (GID) for this
132 * <code>SolarisNumericGroupPrincipal</code> as a long.
133 *
134 * <p>
135 *
136 * @return the user's group identification number (GID) for this
137 * <code>SolarisNumericGroupPrincipal</code> as a long.
138 */
139 public long longValue() {
140 return Long.valueOf(name);
141 }
142
143 /**
144 * Return whether this group identification number (GID) represents
145 * the primary group to which this user belongs.
146 *
147 * <p>
148 *
149 * @return true if this group identification number (GID) represents
150 * the primary group to which this user belongs,
151 * or false otherwise.
152 */
153 public boolean isPrimaryGroup() {
154 return primaryGroup;
155 }
156
157 /**
158 * Return a string representation of this
159 * <code>SolarisNumericGroupPrincipal</code>.
160 *
|