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

com.github.grignaak.collections.CowTreeSet Maven / Gradle / Ivy

There is a newer version: 1.0.0
Show newest version
package com.github.grignaak.collections;

import java.util.Comparator;

public class CowTreeSet extends AbstractMapBackedSet implements CowSet {
    private final CowTreeMap impl;

    public CowTreeSet(Comparator comparator) {
        this(new CowTreeMap<>(comparator));
    }

    private CowTreeSet(CowTreeMap impl) {
        this.impl = impl;
    }

    @Override
    protected CowMap backingMap() {
        return impl;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public CowTreeSet fork() {
        return new CowTreeSet<>(impl.fork());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy