// Path: src/main/java/io/usethesource/criterion/api/JmhSet.java
// public interface JmhSet extends JmhValue, Iterable<JmhValue> {
// 
//   boolean isEmpty();
// 
//   int size();
// 
//   boolean contains(JmhValue element);
// 
//   JmhSet insert(JmhValue element);
// 
//   JmhSet delete(JmhValue elem);
// 
//   default boolean subsetOf(JmhSet other) {
//      throw new UnsupportedOperationException();
//   }
// 
//   default JmhSet union(JmhSet other) {
//     throw new UnsupportedOperationException();
//   }
// 
//   default JmhSet subtract(JmhSet other) {
//     throw new UnsupportedOperationException();
//   }
// 
//   default JmhSet intersect(JmhSet other) {
//     throw new UnsupportedOperationException();
//   }
// 
//   @Override
//   Iterator<JmhValue> iterator();
// 
//   @Deprecated
//   java.util.Set<JmhValue> asJavaSet();
// 
//   interface Builder extends JmhBuilder {
// 
//     @Deprecated
//     default void insert(JmhValue value) {
//       insert(new JmhValue[]{value});
//     }
// 
//     void insert(JmhValue... v);
// 
//     void insertAll(Iterable<? extends JmhValue> collection);
// 
//     @Override
//     JmhSet done();
// 
//   }
// 
// }
// 
// Path: src/main/java/io/usethesource/criterion/api/JmhValue.java
// @CompilerControl(Mode.DONT_INLINE)
// public interface JmhValue {
// 
//   /**
//    * Removes the JmhValue delegation object to reveal its internal representation.
//    *
//    * @return internal representation
//    */
//   Object unwrap();
// 
// }


import java.util.Iterator;
import java.util.function.Consumer;
import io.usethesource.criterion.api.JmhSet;
import io.usethesource.criterion.api.JmhValue;
import org.organicdesign.fp.collections.PersistentHashSet;
/**
 * Copyright (c) Michael Steindorfer <Centrum Wiskunde & Informatica> and Contributors.
 * All rights reserved.
 *
 * This file is licensed under the BSD 2-Clause License, which accompanies this project
 * and is available under https://opensource.org/licenses/BSD-2-Clause.
 */
package io.usethesource.criterion.impl.persistent.paguro;



public final class PaguroSet implements JmhSet {

  private final PersistentHashSet<JmhValue> content;

  public PaguroSet(PersistentHashSet<JmhValue> content) {
    this.content = content;
  }

  @Override
  public boolean isEmpty() {
    return content.isEmpty();
  }

  @Override
  public JmhSet insert(JmhValue value) {
    return new PaguroSet(content.put(value));
  }

  @Override
// Path: src/main/java/io/usethesource/criterion/api/JmhSet.java
// public interface JmhSet extends JmhValue, Iterable<JmhValue> {
// 
//   boolean isEmpty();
// 
//   int size();
// 
//   boolean contains(JmhValue element);
// 
//   JmhSet insert(JmhValue element);
// 
//   JmhSet delete(JmhValue elem);
// 
//   default boolean subsetOf(JmhSet other) {
//      throw new UnsupportedOperationException();
//   }
// 
//   default JmhSet union(JmhSet other) {
//     throw new UnsupportedOperationException();
//   }
// 
//   default JmhSet subtract(JmhSet other) {
//     throw new UnsupportedOperationException();
//   }
// 
//   default JmhSet intersect(JmhSet other) {
//     throw new UnsupportedOperationException();
//   }
// 
//   @Override
//   Iterator<JmhValue> iterator();
// 
//   @Deprecated
//   java.util.Set<JmhValue> asJavaSet();
// 
//   interface Builder extends JmhBuilder {
// 
//     @Deprecated
//     default void insert(JmhValue value) {
//       insert(new JmhValue[]{value});
//     }
// 
//     void insert(JmhValue... v);
// 
//     void insertAll(Iterable<? extends JmhValue> collection);
// 
//     @Override
//     JmhSet done();
// 
//   }
// 
// }
// 
// Path: src/main/java/io/usethesource/criterion/api/JmhValue.java
// @CompilerControl(Mode.DONT_INLINE)
// public interface JmhValue {
// 
//   /**
//    * Removes the JmhValue delegation object to reveal its internal representation.
//    *
//    * @return internal representation
//    */
//   Object unwrap();
// 
// }


// Path: src/main/java/io/usethesource/criterion/impl/persistent/paguro/PaguroSet.java
import java.util.Iterator;
import java.util.function.Consumer;
import io.usethesource.criterion.api.JmhSet;
import io.usethesource.criterion.api.JmhValue;
import org.organicdesign.fp.collections.PersistentHashSet;

/**
 * Copyright (c) Michael Steindorfer <Centrum Wiskunde & Informatica> and Contributors.
 * All rights reserved.
 *
 * This file is licensed under the BSD 2-Clause License, which accompanies this project
 * and is available under https://opensource.org/licenses/BSD-2-Clause.
 */
package io.usethesource.criterion.impl.persistent.paguro;



public final class PaguroSet implements JmhSet {

  private final PersistentHashSet<JmhValue> content;

  public PaguroSet(PersistentHashSet<JmhValue> content) {
    this.content = content;
  }

  @Override
  public boolean isEmpty() {
    return content.isEmpty();
  }

  @Override
  public JmhSet insert(JmhValue value) {
    return new PaguroSet(content.put(value));
  }

  @Override
  public JmhSet delete(JmhValue value) {