mirror of
https://github.com/jlengrand/github-api.git
synced 2026-04-01 15:50:48 +00:00
89 lines
4.0 KiB
HTML
89 lines
4.0 KiB
HTML
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>GHEmail.java</title><link rel="stylesheet" href="../jacoco-resources/prettify.css" type="text/css"/><script type="text/javascript" src="../jacoco-resources/prettify.js"></script></head><body onload="window['PR_TAB_WIDTH']=4;prettyPrint()"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">GitHub API for Java</a> > <a href="index.source.html" class="el_package">org.kohsuke.github</a> > <span class="el_source">GHEmail.java</span></div><h1>GHEmail.java</h1><pre class="source lang-java linenums">/*
|
|
* The MIT License
|
|
*
|
|
* Copyright (c) 2010, Kohsuke Kawaguchi
|
|
*
|
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
* of this software and associated documentation files (the "Software"), to deal
|
|
* in the Software without restriction, including without limitation the rights
|
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
* copies of the Software, and to permit persons to whom the Software is
|
|
* furnished to do so, subject to the following conditions:
|
|
*
|
|
* The above copyright notice and this permission notice shall be included in
|
|
* all copies or substantial portions of the Software.
|
|
*
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
* THE SOFTWARE.
|
|
*/
|
|
package org.kohsuke.github;
|
|
|
|
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
|
|
|
/**
|
|
* Represents an email of GitHub.
|
|
*
|
|
* @author Kelly Campbell
|
|
*/
|
|
@SuppressFBWarnings(
|
|
value = { "UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD", "UWF_UNWRITTEN_FIELD", "NP_UNWRITTEN_FIELD",
|
|
"NP_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD" },
|
|
justification = "JSON API")
|
|
<span class="nc" id="L37">public class GHEmail {</span>
|
|
|
|
protected String email;
|
|
protected boolean primary;
|
|
protected boolean verified;
|
|
|
|
/**
|
|
* Gets email.
|
|
*
|
|
* @return the email
|
|
*/
|
|
public String getEmail() {
|
|
<span class="nc" id="L49"> return email;</span>
|
|
}
|
|
|
|
/**
|
|
* Is primary boolean.
|
|
*
|
|
* @return the boolean
|
|
*/
|
|
public boolean isPrimary() {
|
|
<span class="nc" id="L58"> return primary;</span>
|
|
}
|
|
|
|
/**
|
|
* Is verified boolean.
|
|
*
|
|
* @return the boolean
|
|
*/
|
|
public boolean isVerified() {
|
|
<span class="nc" id="L67"> return verified;</span>
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
<span class="nc" id="L72"> return "Email:" + email;</span>
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
<span class="nc" id="L77"> return email.hashCode();</span>
|
|
}
|
|
|
|
@Override
|
|
public boolean equals(Object obj) {
|
|
<span class="nc bnc" id="L82" title="All 2 branches missed."> if (obj instanceof GHEmail) {</span>
|
|
<span class="nc" id="L83"> GHEmail that = (GHEmail) obj;</span>
|
|
<span class="nc" id="L84"> return this.email.equals(that.email);</span>
|
|
}
|
|
<span class="nc" id="L86"> return false;</span>
|
|
}
|
|
}
|
|
</pre><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.7.202105040129</span></div></body></html> |