This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Collection; | |
import java.util.Comparator; | |
import java.util.Deque; | |
import java.util.Iterator; | |
import java.util.List; | |
import java.util.ListIterator; | |
import java.util.NavigableSet; | |
import java.util.Queue; | |
import java.util.Set; | |
import java.util.SortedSet; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.content.Intent; | |
import android.os.Bundle; | |
import android.support.annotation.NonNull; | |
public abstract class BundleKey<T> { | |
@NonNull final String key; | |
BundleKey(@NonNull String key) { | |
this.key = key; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: app/src/main/java/com/techyourchance/multithreading/demonstrations/designcoroutines/ProducerConsumerBenchmarkUseCase.kt | |
IDEA additional info: | |
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP | |
<+>UTF-8 | |
=================================================================== | |
--- app/src/main/java/com/techyourchance/multithreading/demonstrations/designcoroutines/ProducerConsumerBenchmarkUseCase.kt (revision ce962bc96a3224ae27ff8c94ba658946362ce852) | |
+++ app/src/main/java/com/techyourchance/multithreading/demonstrations/designcoroutines/ProducerConsumerBenchmarkUseCase.kt (date 1572347476000) | |
@@ -1,17 +1,16 @@ | |
package com.techyourchance.multithreading.demonstrations.designcoroutines | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import kotlinx.collections.immutable.PersistentMap | |
import kotlinx.collections.immutable.PersistentSet | |
import kotlinx.collections.immutable.persistentSetOf | |
import kotlinx.collections.immutable.toPersistentMap | |
import org.assertj.core.api.Assertions.assertThat | |
import org.junit.Test | |
class Day18ManyWorldsInterpretation { | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package net.aquadc.util; | |
import java.util.Comparator; | |
import java.util.Objects; | |
import java.util.Optional; | |
import java.util.stream.Collector; | |
/** | |
* Stats of a stream of objects, including {@linkplain #size()}, {@linkplain #min()}, and {@linkplain #max()}. | |
* <p>This is intended to be used with {@link java.util.stream.Stream#collect}, for example</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.IOException; | |
import java.io.UncheckedIOException; | |
/** | |
* XML escaping utils. | |
* | |
* Source: https://gist.github.com/Miha-x64/4ed50f1d5593e45a452efbf456aa1db4 | |
*/ | |
public final class Xml { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.os.Handler; | |
import android.os.Looper; | |
import androidx.annotation.WorkerThread; | |
import java.io.File; | |
import java.util.Collections; | |
import java.util.HashSet; | |
import java.util.Set; | |
import java.util.concurrent.ExecutionException; | |
import java.util.concurrent.Executor; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.graphics.Bitmap; | |
import androidx.annotation.IntRange; | |
import androidx.annotation.NonNull; | |
import java.util.Arrays; | |
/** | |
* This is copied from https://stackoverflow.com/a/10028267/3050249 | |
* and optimized for less memory consumption & better locality, and creates less GC pressure. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@file:Suppress("NOTHING_TO_INLINE") | |
package net.aquadc.commonandroid.views | |
import android.content.Context | |
import android.view.View | |
import android.widget.RelativeLayout | |
import android.widget.RelativeLayout.TRUE | |
import androidx.annotation.IdRes | |
import splitties.views.dsl.core.wrapContent | |
import kotlin.contracts.ExperimentalContracts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package net.aquadc.util; | |
import java.io.IOException; | |
import java.io.UncheckedIOException; | |
import java.util.Iterator; | |
import java.util.function.Consumer; | |
import java.util.stream.Stream; | |
public final class Iterators { | |
private Iterators() {} |