package love.distributedrebirth.bassboonyd; import java.util.Arrays; import java.util.Iterator; import java.util.List; import java.util.function.Consumer; import java.util.stream.Stream; /** * Inject EnumSet methods. * * @author willemtsade ©Δ∞ 仙上主天 */ public interface BãßBȍőnEnumSetʸᴰ extends BãßBȍőnEnumʸᴰ { int ordinal(); default int dingRangTelNul() { return ordinal(); } default int dingRangTelEen() { return ordinal() + 1; } @SuppressWarnings("unchecked") default T[] staticInstances() { try { Object result = getClass().getMethod(BãßBȍőnConstants.STR_VALUES).invoke(null); return (T[]) result; } catch (Exception e) { throw new RuntimeException(e); } } default List staticInstancesList() { return Arrays.asList(staticInstances()); } default Iterator staticInstancesIterator() { return staticInstancesList().iterator(); } default Stream staticInstancesStream() { return staticInstancesList().stream(); } default T volgende() { T[] values = staticInstances(); int resultIndex = 0; for (int i=0;i consumer) { for (T value:staticInstances()) { consumer.accept(value); } } }