Files
github-api/jacoco/org.kohsuke.github/ReactionContent.java.html
2021-06-02 11:09:28 -07:00

55 lines
3.1 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>ReactionContent.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> &gt; <a href="index.source.html" class="el_package">org.kohsuke.github</a> &gt; <span class="el_source">ReactionContent.java</span></div><h1>ReactionContent.java</h1><pre class="source lang-java linenums">package org.kohsuke.github;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
/**
* Content of reactions.
*
* @author Kohsuke Kawaguchi
* @see &lt;a href=&quot;https://developer.github.com/v3/reactions/&quot;&gt;API documentation&lt;/a&gt;
* @see GHReaction
*/
<span class="fc" id="L13">public enum ReactionContent {</span>
<span class="fc" id="L14"> PLUS_ONE(&quot;+1&quot;),</span>
<span class="fc" id="L15"> MINUS_ONE(&quot;-1&quot;),</span>
<span class="fc" id="L16"> LAUGH(&quot;laugh&quot;),</span>
<span class="fc" id="L17"> CONFUSED(&quot;confused&quot;),</span>
<span class="fc" id="L18"> HEART(&quot;heart&quot;),</span>
<span class="fc" id="L19"> HOORAY(&quot;hooray&quot;),</span>
<span class="fc" id="L20"> ROCKET(&quot;rocket&quot;),</span>
<span class="fc" id="L21"> EYES(&quot;eyes&quot;);</span>
private final String content;
<span class="fc" id="L25"> ReactionContent(String content) {</span>
<span class="fc" id="L26"> this.content = content;</span>
<span class="fc" id="L27"> }</span>
/**
* Gets content.
*
* @return the content
*/
@JsonValue
public String getContent() {
<span class="fc" id="L36"> return content;</span>
}
/**
* For content reaction content.
*
* @param content
* the content
* @return the reaction content
*/
@JsonCreator
public static ReactionContent forContent(String content) {
<span class="pc bpc" id="L48" title="1 of 2 branches missed."> for (ReactionContent c : ReactionContent.values()) {</span>
<span class="fc bfc" id="L49" title="All 2 branches covered."> if (c.getContent().equals(content))</span>
<span class="fc" id="L50"> return c;</span>
}
<span class="nc" id="L52"> return null;</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>