Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
set -e
DRIVE=$1
OP=$2
# Prints usage message and exits with an error
usage() {
echo "Usage:"
public class LazyValue<T> implements Supplier<T> {
private volatile T value;
private final Supplier<T> producer;
private final Object lock = new Object();
public LazyValue(Supplier<T> producer) {
this.producer = producer;
}
@Override