// NewBoolFilter creates a new bool filter.
964426
func NewBoolFilter() BoolFilter {
	f := BoolFilter{
		mustClauses:    make([]Filter, 0),
		shouldClauses:  make([]Filter, 0),
		mustNotClauses: make([]Filter, 0),
	}
	return f
}
151593
func newRaftLayer(ln net.Listener, addr net.Addr) *raftLayer {
	return &raftLayer{
		ln:   ln,
		addr: addr,
	}
}
374326
func NewBooleanNot(Expression node.Node) *BooleanNot {
	return &BooleanNot{
		FreeFloating: nil,
		Expr:         Expression,
	}
}
464115
func (o *Subnet) CreateProxyARPFilter(child *ProxyARPFilter) *bambou.Error {

	return bambou.CurrentSession().CreateChild(o, child)
}
409879
func NewLogicalOr(Variable node.Node, Expression node.Node) *LogicalOr {
	return &LogicalOr{
		FreeFloating: nil,
		Left:         Variable,
		Right:        Expression,
	}
}
741561
func NewBool(name string, description string, metadata *types.MetricMetadata, fields ...field.Field) Bool {
	if metadata == nil {
		metadata = &types.MetricMetadata{}
	}
	m := &boolMetric{metric{
		MetricInfo: types.MetricInfo{
			Name:        name,
			Description: description,
			Fields:      fields,
			ValueType:   types.BoolType,
		},
		MetricMetadata: *metadata,
	}}
	registry.Add(m)
	return m
}
648391
func NewMultiRowRangeFilter(rowRangeList []*RowRange) *MultiRowRangeFilter {
	rangeList := make([]*pb.RowRange, len(rowRangeList))
	for i, rr := range rowRangeList {
		rangeList[i] = (*pb.RowRange)(rr)
	}
	return &MultiRowRangeFilter{
		RowRangeList: rangeList,
	}
}
867942
func NewGitFilter(cfg *config.Configuration) *GitFilter {
	return &GitFilter{cfg: cfg, fs: cfg.Filesystem()}
}
1303507
func (f FlagInfo) BindBoolFlag(flags *pflag.FlagSet, target *bool) FlagInfo {
	// you can't register a flag without a long name
	if len(f.LongName) > 0 {
		// try to parse Default as a bool.  If it fails, assume false
		boolVal, err := strconv.ParseBool(f.Default)
		if err != nil {
			boolVal = false
		}

		flags.BoolVarP(target, f.LongName, f.ShortName, boolVal, f.Description)
	}
	return f
}
140310
func NewBoolByInterface(i interface{}) (Bool, error) {

	t := reflect.TypeOf(i)
	val := reflect.ValueOf(i)
	if val.Kind() == reflect.Ptr {
		val = val.Elem()
	}

	if t.Name() == "Bool" {
		if b, ok := (val.Interface()).(Bool); ok {
			return b, nil
		}
	}

	switch val.Kind() {

	case reflect.Bool:
		return NewBool((val.Interface()).(bool)), nil

	case reflect.Uint8:
		return Bool((val.Interface()).(byte)), nil

	case reflect.String:
		if b, err := strconv.ParseBool((val.Interface()).(string)); err == nil {
			return NewBool(b), nil
		}

	case reflect.Slice:
		v := val.Index(0)
		if b, ok := (v.Interface()).(byte); ok {
			return Bool(b), nil
		}
	}

	return False, errors.New("unsupported type")
}
348148
func NewBinaryBooleanExpression(op OP, lE, rE Evaluator) (Evaluator, error) {
	switch op {
	case AND, OR:
		return &booleanNode{
			op: op,
			lS: true,
			lE: lE,
			rS: true,
			rE: rE,
		}, nil
	default:
		return nil, errors.New("binary boolean expressions require the operation to be one for the follwing 'and', 'or'")
	}
}
528950
func NewBoolQuery() BoolQuery {
	q := BoolQuery{
		mustClauses:    make([]Query, 0),
		shouldClauses:  make([]Query, 0),
		mustNotClauses: make([]Query, 0),
	}
	return q
}
96752
func NewAlter(ctx *Context, stmt *rel.SqlAlter) *Alter {
	return &Alter{Stmt: stmt, PlanBase: NewPlanBase(false), Ctx: ctx}
}
1155332
func (f *List) ConstructPBFilter() (*pb.Filter, error) {
	if !ListOperator(*f.Operator).isValid() {
		return nil, errors.New("invalid operator specified")
	}

	serializedFilter, err := proto.Marshal((*pb.FilterList)(f))
	if err != nil {
		return nil, err
	}
	filter := &pb.Filter{
		Name:             proto.String(filterPath + "FilterList"),
		SerializedFilter: serializedFilter,
	}
	return filter, nil
}
1157120
func NewBooleanSimple(b bool) BooleanAttribute {
	result := &BooleanSimple{NewAttribute(NORMAL, nil, nil)}
	result.Set(b)
	return result
}
812454
func NewPublicResolverFilterer(address common.Address, filterer bind.ContractFilterer) (*PublicResolverFilterer, error) {
	contract, err := bindPublicResolver(address, nil, nil, filterer)
	if err != nil {
		return nil, err
	}
	return &PublicResolverFilterer{contract: contract}, nil
}
47799
func newBufReader(rd io.Reader) *bufReader {
	return &bufReader{buf: bufio.NewReader(rd)}
}