// Map maps the remote WorkItem to a local RemoteWorkItem
484055
func Map(remoteItem AttributeAccessor, mapping RemoteWorkItemMap) (RemoteWorkItem, error) {
	remoteWorkItem := RemoteWorkItem{Fields: make(map[string]interface{})}
	for from, to := range mapping {
		originalValue := remoteItem.Get(from.Expression)
		convertedValue, err := from.AttributeConverter.Convert(originalValue, remoteItem)
		if err == nil {
			remoteWorkItem.Fields[to] = convertedValue
		}
	}
	return remoteWorkItem, nil
}
781390
func (w *WatchPodMapper) Map(obj handler.MapObject) []reconcile.Request {
	pod, ok := obj.Object.(*corev1.Pod)
	if !ok {
		return nil
	}

	if pod.Spec.NodeName != w.nodeName {
		return nil
	}

	if pod.Spec.HostNetwork && !w.enableHostPods {
		return nil
	}

	return []reconcile.Request{
		{
			NamespacedName: types.NamespacedName{
				Name:      pod.Name,
				Namespace: pod.Namespace,
			},
		},
	}
}
123131
func (t Result) Map() map[string]Result {
	if t.Type != JSON {
		return map[string]Result{}
	}
	r := t.arrayOrMap('{', false)
	return r.o
}
629477
func (f *Feed) Map(bytes []byte) error {
	return json.Unmarshal(bytes, f)
}
529230
func (ls LineString) Map() map[string]interface{} {
	result := make(map[string]interface{})
	result[COORDINATES] = ls.Coordinates
	result[TYPE] = LINESTRING
	return result
}
1135272
func (w *Window) Map() {
	if w == nil {
		return
	}

	xproto.MapWindow(w.X.Conn(), w.Id)
}
392248
func (m *CollapsingMapper) Map(e *Entity) (PilosaRecord, error) {
	pr := PilosaRecord{}
	if m.ColTranslator != nil {
		col, err := m.ColTranslator.GetID(string(e.Subject))
		if err != nil {
			return pr, errors.Wrap(err, "getting column id from subject")
		}
		pr.Col = col
	} else if m.Nexter != nil {
		pr.Col = m.Nexter.Next()
	} else {
		pr.Col = string(e.Subject)
	}
	return pr, m.mapObj(e, &pr, []string{})
}
1330631
func (a Tags) Map() map[string]string {
	m := make(map[string]string, len(a))
	for _, t := range a {
		m[string(t.Key)] = string(t.Value)
	}
	return m
}
82145
func (i *ImageService) Map() map[image.ID]*image.Image {
	return i.imageStore.Map()
}
671757
func (rs *RangeScanner) ItemMapping() (map[string][]byte, error) {
	items := make(map[string][]byte)
	err := rs.db.View(func(tx *bolt.Tx) error {
		c := tx.Bucket(rs.BucketName).Cursor()
		for k, v := c.Seek(rs.Min); isBefore(k, rs.Max); k, v = c.Next() {
			items[string(k)] = v
		}
		return nil
	})
	if err != nil {
		return nil, err
	}
	return items, err
}
90733
func (rs *RangeScanner) Map(do func(k, v []byte) error) error {
	return rs.db.View(func(tx *bolt.Tx) error {
		c := tx.Bucket(rs.BucketName).Cursor()
		for k, v := c.Seek(rs.Min); isBefore(k, rs.Max); k, v = c.Next() {
			do(k, v)
		}
		return nil
	})
}
1355892
func (*Numeric) Map(cursor VCursor, ids []sqltypes.Value) ([]key.Destination, error) {
	out := make([]key.Destination, 0, len(ids))
	for _, id := range ids {
		num, err := sqltypes.ToUint64(id)
		if err != nil {
			out = append(out, key.DestinationNone{})
			continue
		}
		var keybytes [8]byte
		binary.BigEndian.PutUint64(keybytes[:], num)
		out = append(out, key.DestinationKeyspaceID(keybytes[:]))
	}
	return out, nil
}
1179508
func (r *Response) Map(fn MapResponseFunc) *Response {
	r.Mappers = append(r.Mappers, fn)
	return r
}
804058
func (k *KeyValueStringSlice) Map() map[string]string {
	result := make(map[string]string, len(k.Keys))
	for i, key := range k.Keys {
		result[key] = k.Values[i]
	}
	return result
}
826397
func Map(x, inmin, inmax, outmin, outmax int64) int64 {
	return (x-inmin)*(outmax-outmin)/(inmax-inmin) + outmin
}
539328
func (n Headers) Map() (map[string]string, error) {
	m := make(map[string]string)
	err := json.Unmarshal(n, &m)
	return m, err
}
197899
func (m *Model) Map(words []string) map[string]Vector {
	result := make(map[string]Vector)
	for _, w := range words {
		if v, ok := m.words[w]; ok {
			result[w] = v
		}
	}
	return result
}