Package net.createmod.catnip.utility
Class Couple<T>
java.lang.Object
net.createmod.catnip.utility.Pair<T,T>
net.createmod.catnip.utility.Couple<T>
- All Implemented Interfaces:
Iterable<T>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancopy()static <T> Couple<T> static <T> Couple<T> create(T first, T second) static <T> Couple<T> createWithContext(Function<Boolean, T> factory) static <S> Couple<S> deserializeEach(net.minecraft.nbt.ListTag list, Function<net.minecraft.nbt.CompoundTag, S> deserializer) booleanvoidvoidforEachWithContext(BiConsumer<T, Boolean> consumer) <S> voidforEachWithParams(BiConsumer<T, S> function, Couple<S> values) get(boolean first) iterator()<S> Couple<S> <S> Couple<S> mapNotNull(Function<T, S> function) <S,R> Couple <S> mapNotNullWithParam(BiFunction<T, R, S> function, R value) <S> Couple<S> mapWithContext(BiFunction<T, Boolean, S> function) <S,R> Couple <S> mapWithParams(BiFunction<T, R, S> function, Couple<R> values) voidvoidreplaceWithContext(BiFunction<T, Boolean, T> function) <S> voidreplaceWithParams(BiFunction<T, S, T> function, Couple<S> values) net.minecraft.nbt.ListTagserializeEach(Function<T, net.minecraft.nbt.CompoundTag> serializer) voidstream()static <B,T> net.minecraft.network.codec.StreamCodec <B, Couple<T>> streamCodec(net.minecraft.network.codec.StreamCodec<? super B, T> codec) swap()Methods inherited from class net.createmod.catnip.utility.Pair
equals, getFirst, getSecond, hashCode, of, setFirst, setSecond, streamCodec, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
spliterator
-
Constructor Details
-
Couple
-
-
Method Details
-
create
-
create
-
createWithContext
-
get
-
set
-
copy
-
map
-
mapNotNull
-
mapWithContext
-
mapWithParams
-
mapNotNullWithParam
-
both
-
either
-
replace
-
replaceWithContext
-
replaceWithParams
-
forEach
-
forEachWithContext
-
forEachWithParams
-
swap
-
serializeEach
-
deserializeEach
-
iterator
-
stream
-
streamCodec
public static <B,T> net.minecraft.network.codec.StreamCodec<B,Couple<T>> streamCodec(net.minecraft.network.codec.StreamCodec<? super B, T> codec)
-