// NewInteger creates a new Integer object with the provided value as a string
431055
func NewInteger(value string) (DataType, error) {
	returnValue := new(Integer)
	v, err := strconv.Atoi(value)
	returnValue.value = v
	return returnValue, err
}
1245137
func NewIntTypeParserToVar(variable *int) *IntTypeParser {
	parser := new(IntTypeParser)
	parser.setter = func(value int) {
		*variable = value
	}
	return parser
}
1229620
func IntToNumber(i *big.Int) ast.Number {
	return ast.Number(i.String())
}
1234845
func NewPosType(s string) (posType, error) {
	var e posType
	err := e.FromString(s)
	if err != nil {
		return 0, err
	}
	return e, nil
}
543753
func (s *AcceptQualificationRequestInput) SetIntegerValue(v int64) *AcceptQualificationRequestInput {
	s.IntegerValue = &v
	return s
}
1089232
func NewIntegerSimple(i int) IntegerAttribute {
	result := &IntegerSimple{
		NewAttribute(NORMAL, nil, nil),
	}
	result.Set(i)
	return result
}
1094831
func (primative *Primative) AsInteger() (int64, error) {
	switch val := primative.value.(type) {
	case bool:
		intVal := int64(0)
		if val {
			intVal = int64(1)
		}
		return intVal, nil
	case float64:
		return int64(math.Trunc(val)), nil
	case int64:
		return val, nil
	case string:
		return strconv.ParseInt(val, 10, 64)
	}

	msg := fmt.Sprintf("Could not convert value %s to type INTEGER", primative.value)
	return 0, errors.New(msg)
}
457490
func NewIntegerEncoder(sz int) IntegerEncoder {
	return IntegerEncoder{
		rle:    true,
		values: make([]uint64, 0, sz),
	}
}
665586
func NewIntResult(val int64, err error) *IntCmd {
	var cmd IntCmd
	cmd.val = val
	cmd.setErr(err)
	return &cmd
}
1029223
func NewInt(Expr node.Node) *Int {
	return &Int{
		FreeFloating: nil,
		Expr:         Expr,
	}
}
75115
func NewInt64(v int64) Value {
	return MakeTrusted(Int64, strconv.AppendInt(nil, v, 10))
}
855773
func NewInt32(items ...int32) Int32 {
	ss := Int32{}
	ss.Insert(items...)
	return ss
}
1099877
func New(hint uint64) *FastIntegerHashMap {
	if hint == 0 {
		hint = 16
	}

	hint = roundUp(hint)
	return &FastIntegerHashMap{
		count:   0,
		packets: make(packets, hint),
	}
}
1040250
func (list *List) GetInteger(idx int) (int64, error) {
	value, err := list.Get(idx)
	if err != nil {
		return int64(0), err
	}

	switch value.(type) {
	case *Primative:
		return value.(*Primative).AsInteger()
	}

	return int64(0), errors.New("could not convert non-primative value to integer")
}
1360338
func (r *Reply) Int() (int64, error) {
	if r.Type() == ReplyInteger {
		return r.integerValue, nil
	}
	s, err := r.String()
	if err != nil {
		return 0, err
	}
	x, err := strconv.ParseInt(s, 10, 64)
	if err != nil {
		return 0, ErrConvert
	}
	return x, nil
}
905703
func (section *Section) GetInteger(name string) (int64, error) {
	value, err := section.Get(name)
	if err != nil {
		return int64(0), err
	}

	switch value.(type) {
	case *Primative:
		return value.(*Primative).AsInteger()
	}

	return int64(0), errors.New("could not convert non-primative value to integer")
}
532211
func NewInt64(items ...int64) Int64 {
	ss := Int64{}
	ss.Insert(items...)
	return ss
}