All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.kohsuke.github.GHPersonSet Maven / Gradle / Ivy

There is a newer version: 2.0.0-alpha-2
Show newest version
package org.kohsuke.github;

import java.util.Collection;
import java.util.HashSet;

/**
 * Set of {@link GHPerson} with helper lookup methods.
 * 
 * @author Kohsuke Kawaguchi
 */
public final class GHPersonSet extends HashSet {
    public GHPersonSet() {
    }

    public GHPersonSet(Collection c) {
        super(c);
    }

    public GHPersonSet(int initialCapacity, float loadFactor) {
        super(initialCapacity, loadFactor);
    }

    public GHPersonSet(int initialCapacity) {
        super(initialCapacity);
    }

    /**
     * Finds the item by its login.
     */
    public T byLogin(String login) {
        for (T t : this)
            if (t.getLogin().equals(login))
                return t;
        return null;
    }    
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy