Clover icon

sunshower-core

  1. Project Clover database Fri Apr 6 2018 03:27:42 UTC
  2. Package io.sunshower.model.core.auth

File Token.java

 

Coverage histogram

../../../../../img/srcFileCovDistChart0.png
60% of files have more coverage

Code metrics

14
18
9
1
63
47
16
0.89
2
9
1.78

Classes

Class Line # Actions
Token 12 18 16
0.00%
 

Contributing tests

No tests hitting this source file were found.

Source view

1    package io.sunshower.model.core.auth;
2   
3    import java.util.Date;
4    import javax.xml.bind.annotation.XmlAccessType;
5    import javax.xml.bind.annotation.XmlAccessorType;
6    import javax.xml.bind.annotation.XmlAttribute;
7    import javax.xml.bind.annotation.XmlRootElement;
8   
9    /** Created by haswell on 10/18/16. */
10    @XmlRootElement
11    @XmlAccessorType(XmlAccessType.NONE)
 
12    public class Token {
13   
14    @XmlAttribute private String token;
15   
16    @XmlAttribute private Date expiration;
17   
 
18  0 toggle public Token() {}
19   
 
20  0 toggle public Token(String token, Date expiration) {
21  0 this.token = token;
22  0 this.expiration = expiration;
23    }
24   
 
25  0 toggle public String getToken() {
26  0 return token;
27    }
28   
 
29  0 toggle public void setToken(String token) {
30  0 this.token = token;
31    }
32   
 
33  0 toggle public Date getExpiration() {
34  0 return expiration;
35    }
36   
 
37  0 toggle public void setExpiration(Date expiration) {
38  0 this.expiration = expiration;
39    }
40   
 
41  0 toggle @Override
42    public boolean equals(Object o) {
43  0 if (this == o) return true;
44  0 if (!(o instanceof Token)) return false;
45   
46  0 Token token1 = (Token) o;
47   
48  0 if (token != null ? !token.equals(token1.token) : token1.token != null) return false;
49  0 return expiration != null ? expiration.equals(token1.expiration) : token1.expiration == null;
50    }
51   
 
52  0 toggle @Override
53    public int hashCode() {
54  0 int result = token != null ? token.hashCode() : 0;
55  0 result = 31 * result + (expiration != null ? expiration.hashCode() : 0);
56  0 return result;
57    }
58   
 
59  0 toggle @Override
60    public String toString() {
61  0 return "Token{" + "token='" + token + '\'' + ", expiration=" + expiration + '}';
62    }
63    }