Creates a Bool with concrete value
        :param value: The boolean value
        :param annotations: The annotations to initialize the bool with
        :return: The freshly created Bool()
171916
def Bool(value: "__builtins__.bool", annotations: Annotations = None) -> bool.Bool:
        
        raw = z3.BoolVal(value)
        return Bool(raw, annotations)
887461
function(value) {

		if (Lava.schema.DEBUG && typeof(value) != 'boolean') Lava.t("translateBoolean: argument is not boolean type");
		return Lava.locales[Lava.schema.LOCALE].booleans[+value];

	}
1142666
function boolean(value) {
  var parsedBoolean = json(value);

  // handle 0|1 case
  if (typeOf(parsedBoolean) == 'number' && [0, 1].indexOf(parsedBoolean) > -1) {
    parsedBoolean = parsedBoolean === 0 ? false : true;
  }

  // couldn't parse it
  if (typeOf(parsedBoolean) != 'boolean') {
    return throwModifierError('boolean', value, {message: 'Invalid Boolean'});
  }

  return parsedBoolean;
}
1320236
def _cast_boolean(value):
    
    _BOOLEANS = {'1': True, 'yes': True, 'true': True, 'on': True,
                 '0': False, 'no': False, 'false': False, 'off': False, '': False}
    value = str(value)
    if value.lower() not in _BOOLEANS:
        raise ValueError('Not a boolean: %s' % value)

    return _BOOLEANS[value.lower()]
1256576
public static Boolean toNullableBoolean(Object value) {
		if (value == null)
			return null;
		if (value instanceof Boolean)
			return (boolean) value;
		if (value instanceof Duration)
			return ((Duration) value).toMillis() > 0;

		String strValue = value.toString().toLowerCase();
		if (strValue.equals("1") || strValue.equals("true") || strValue.equals("t") || strValue.equals("yes")
				|| strValue.equals("y"))
			return true;

		if (strValue.equals("0") || strValue.equals("false") || strValue.equals("f") || strValue.equals("no")
				|| strValue.equals("n"))
			return false;

		return null;
	}
1134564
private List<Boolean> asBooleanList(Object value) {
        boolean[] values = (boolean[]) value;
        List<Boolean> list = new ArrayList<Boolean>(values.length);
        for (boolean booleanValue : values) {
            list.add(booleanValue);
        }
        return list;
    }
1297085
def append_annotation(self, annotation: str, values: Set[str]) -> 'Seeding':
        
        return self._append_seed(SEED_TYPE_ANNOTATION, {
            'annotations': {
                annotation: values,
            }
        })
1094524
public void setValue(boolean val) {
    try {
      super.setValue(Boolean.valueOf(val));
    }
    catch(ParameterException e) {
      // We're pretty sure that any Boolean is okay, so this should never be
      // reached.
      throw new AbortException("Flag did not accept boolean value!", e);
    }
  }
1343850
ArgumentsBuilder flag(String param, Boolean value) {
        if (Boolean.TRUE.equals(value)) {
            args.add(param);
        }
        return this;
    }
408967
def p_ConstValue_boolean(p):
  """"""
  p[0] = model.Value(type=model.Value.BOOLEAN, value=p[1])
235185
def to_bool(value):
    '''
    
    '''
    value = from_bool(value)
    if isinstance(value, bool):
        value = 'on' if value else 'off'
    elif value is None:
        value = 'none'

    return value
23842
static public Value booleanValue (String name, final boolean currentValue, final String description) {
		return new DefaultValue(name, String.valueOf(currentValue)) {
			public void showDialog () {
				JCheckBox checkBox = new JCheckBox();
				checkBox.setSelected(currentValue);
				if (showValueDialog(checkBox, description)) value = String.valueOf(checkBox.isSelected());
			}

			public Object getObject () {
				return Boolean.valueOf(value);
			}
		};
	}
633725
def Or(a: Bool, b: Bool) -> Bool:
    
    union = a.annotations + b.annotations
    return Bool(z3.Or(a.raw, b.raw), annotations=union)
891183
def DEFINE_boolean(flag_name, default_value, docstring):  # pylint: disable=invalid-name
    

    # Register a custom function for 'bool' so --flag=True works.
    def str2bool(bool_str):
        """Return a boolean value from a give string."""
        return bool_str.lower() in ('true', 't', '1')

    get_context_parser().add_argument(
        '--' + flag_name,
        nargs='?',
        const=True,
        help=docstring,
        default=default_value,
        type=str2bool)

    # Add negated version, stay consistent with argparse with regard to
    # dashes in flag names.
    get_context_parser().add_argument(
        '--no' + flag_name,
        action='store_false',
        dest=flag_name.replace('-', '_'))
1095132
def parse_bool(v, default=None, exceptions: bool=True) -> bool:
    
    if isinstance(v, bool):
        return v
    s = str(v).lower()
    if s in TRUE_VALUES:
        return True
    elif s in FALSE_VALUES:
        return False
    else:
        if exceptions:
            raise ValidationError('Failed to parse boolean from "{}"'.format(v))
        return default
755808
private boolean getBooleanValue(final Value value, final boolean defaultValue) {

		if (value != null && value instanceof BooleanValue) {

			return ((BooleanValue)value).isValue();
		}

		return defaultValue;
	}
657145
def validate(self, value):
        
        value = super(Boolean, self).validate(value)

        if value is not None:
            value = bool(value)

        return value