package game.properties; import java.util.Collection; import game.collect.ImmutableSet; public class PropertyBool extends PropertyHelper { private final ImmutableSet allowedValues = ImmutableSet.of(Boolean.valueOf(true), Boolean.valueOf(false)); protected PropertyBool(String name) { super(name, Boolean.class); } public Collection getAllowedValues() { return this.allowedValues; } public static PropertyBool create(String name) { return new PropertyBool(name); } /** * Get the name for the given value. */ public String getName(Boolean value) { return value.toString(); } }