]> git.argeo.org Git - lgpl/argeo-commons.git/blob - auth/HttpSessionId.java
Prepare next development cycle
[lgpl/argeo-commons.git] / auth / HttpSessionId.java
1 package org.argeo.cms.auth;
2
3 import org.argeo.cms.CmsException;
4
5 public class HttpSessionId {
6 private final String value;
7
8 public HttpSessionId(String value) {
9 if (value == null)
10 throw new CmsException("value cannot be null");
11 this.value = value;
12 }
13
14 public String getValue() {
15 return value;
16 }
17
18 @Override
19 public int hashCode() {
20 return value.hashCode();
21 }
22
23 @Override
24 public boolean equals(Object obj) {
25 return obj instanceof HttpSessionId && ((HttpSessionId) obj).getValue().equals(value);
26 }
27
28 @Override
29 public String toString() {
30 return "HttpSessionId #" + value;
31 }
32
33 }