Last active
August 29, 2015 14:10
-
-
Save kozake/29e0e28032ac593b6e34 to your computer and use it in GitHub Desktop.
しょぼちむ Advent Calendar 2014 のソース(可能性)
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 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