// 
// Decompiled by Procyon v0.6.0
// 

package com.hypixel.hytale.common.fastutil;

import javax.annotation.Nonnull;
import java.util.Collection;
import javax.annotation.Nullable;
import it.unimi.dsi.fastutil.objects.ObjectOpenHashSet;

public class HObjectOpenHashSet<K> extends ObjectOpenHashSet<K>
{
    @Nullable
    public K first() {
        if (this.containsNull) {
            return this.key[this.n];
        }
        final K[] key = this.key;
        int pos = this.n;
        while (pos-- != 0) {
            if (key[pos] != null) {
                return key[pos];
            }
        }
        return null;
    }
    
    public void pushInto(@Nonnull final Collection<K> c) {
        if (this.containsNull) {
            c.add(this.key[this.n]);
        }
        final K[] key = this.key;
        int pos = this.n;
        while (pos-- != 0) {
            if (key[pos] != null) {
                c.add(key[pos]);
            }
        }
    }
}
