mirror of
https://github.com/jlengrand/github-api.git
synced 2026-03-22 00:11:26 +00:00
79 lines
3.3 KiB
HTML
79 lines
3.3 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>GHPersonSet.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">GHPersonSet.java</span></div><h1>GHPersonSet.java</h1><pre class="source lang-java linenums">package org.kohsuke.github;
|
|
|
|
import java.util.Arrays;
|
|
import java.util.Collection;
|
|
import java.util.HashSet;
|
|
|
|
/**
|
|
* Set of {@link GHPerson} with helper lookup methods.
|
|
*
|
|
* @param <T>
|
|
* the type parameter
|
|
* @author Kohsuke Kawaguchi
|
|
*/
|
|
public class GHPersonSet<T extends GHPerson> extends HashSet<T> {
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
/**
|
|
* Instantiates a new Gh person set.
|
|
*/
|
|
<span class="fc" id="L20"> public GHPersonSet() {</span>
|
|
<span class="fc" id="L21"> }</span>
|
|
|
|
/**
|
|
* Instantiates a new Gh person set.
|
|
*
|
|
* @param c
|
|
* the c
|
|
*/
|
|
public GHPersonSet(Collection<? extends T> c) {
|
|
<span class="fc" id="L30"> super(c);</span>
|
|
<span class="fc" id="L31"> }</span>
|
|
|
|
/**
|
|
* Instantiates a new Gh person set.
|
|
*
|
|
* @param c
|
|
* the c
|
|
*/
|
|
public GHPersonSet(T... c) {
|
|
<span class="nc" id="L40"> super(Arrays.asList(c));</span>
|
|
<span class="nc" id="L41"> }</span>
|
|
|
|
/**
|
|
* Instantiates a new Gh person set.
|
|
*
|
|
* @param initialCapacity
|
|
* the initial capacity
|
|
* @param loadFactor
|
|
* the load factor
|
|
*/
|
|
public GHPersonSet(int initialCapacity, float loadFactor) {
|
|
<span class="nc" id="L52"> super(initialCapacity, loadFactor);</span>
|
|
<span class="nc" id="L53"> }</span>
|
|
|
|
/**
|
|
* Instantiates a new Gh person set.
|
|
*
|
|
* @param initialCapacity
|
|
* the initial capacity
|
|
*/
|
|
public GHPersonSet(int initialCapacity) {
|
|
<span class="nc" id="L62"> super(initialCapacity);</span>
|
|
<span class="nc" id="L63"> }</span>
|
|
|
|
/**
|
|
* Finds the item by its login.
|
|
*
|
|
* @param login
|
|
* the login
|
|
* @return the t
|
|
*/
|
|
public T byLogin(String login) {
|
|
<span class="pc bpc" id="L73" title="1 of 2 branches missed."> for (T t : this)</span>
|
|
<span class="pc bpc" id="L74" title="1 of 2 branches missed."> if (t.getLogin().equals(login))</span>
|
|
<span class="fc" id="L75"> return t;</span>
|
|
<span class="nc" id="L76"> 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> |