Skip to content

Instantly share code, notes, and snippets.

@kozake
Last active August 29, 2015 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kozake/29e0e28032ac593b6e34 to your computer and use it in GitHub Desktop.
Save kozake/29e0e28032ac593b6e34 to your computer and use it in GitHub Desktop.
しょぼちむ Advent Calendar 2014 のソース(可能性)
package syobochim;
import java.math.BigDecimal;
public final class 可能性<T> {
public final T 選択肢;
public final BigDecimal 確率;
private 可能性(final T 選択肢, final BigDecimal 確率) {
this.選択肢 = 選択肢;
this.確率 = 確率;
}
public static <T> 可能性<T> create(final T 選択肢,
final BigDecimal 確率) {
return new 可能性<>(選択肢, 確率);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment