/* Getters
******* Returns a list of items, or an empty list if value at listKey is not set
519427
function getListItems(listKey, from, to, callback) {
	this.redisClient.lrange(listKey, from, to, function(err, itemBytesArray) {
		if (err) { return callback(err, null) }
		if (!itemBytesArray) { return callback(null, []) }
		for (var items=[], i=0; i<itemBytesArray.length; i++) {
			items.push(itemBytesArray[i].toString())
		}
		callback(null, items)
	})
}
688066
protected void lookupGetters(final Map<String, Property> properties, final MethodHolder<?> clazz)
   {
      // Hack until https://issues.jboss.org/browse/FORGE-368

      for (Method<?, ?> method : clazz.getMethods())
      {
         // Exclude static methods

         if (method.isStatic())
         {
            continue;
         }

         // Exclude non-public methods. Section 8.3.1 of the JavaBean specification requires that getters be public.
         if (!method.isPublic())
         {
            continue;
         }

         // Get type

         if (!method.getParameters().isEmpty())
         {
            continue;
         }

         String returnType = method.getReturnType() != null ? method.getReturnType().getQualifiedName() : null;

         if (returnType == null)
         {
            continue;
         }

         // Get name

         String propertyName = isGetter(method);

         if (propertyName == null)
         {
            continue;
         }

         Field<?> privateField = getPrivateField((FieldHolder<?>) clazz, propertyName);

         if (privateField != null && this.privateFieldConvention == null)
         {
            propertyName = privateField.getName();
         }

         properties
                  .put(propertyName,
                           new ForgeProperty(propertyName, returnType, method, null, privateField, this.project));
      }
   }
1022649
function getValue(source, keyPath) {
        try {
            if (keyPath instanceof Array) {
                var arrayValue = [];
                for (var i = 0; i < keyPath.length; i++) {
                    arrayValue.push(eval("source." + keyPath[i]));
                }
                return arrayValue;
            } else {
                return eval("source." + keyPath);
            }
        }
        catch (e) {
            return undefined;
        }
    }
1219786
function useStateWithGetter(initial) {
  const ref = useRef();
  const [state, setState] = useState(initial);
  ref.current = state;
  const set = (value) => {
    ref.current = value;
    setState(value);
  };
  const get = () => {
    return ref.current;
  };
  return [state, set, get];
}
317318
function getValue(item, keyOrPath) {
  const keys = keyOrPath.split('.');
  const used = [];
  while (keys.length > 0) {
    const key = keys.shift();
    used.push(key);
    if (!isValid(item[key])) {
      throw new Error(`path ${used.join('.')} is not an object`);
    }
    item = item[key];
  }
  return item[keys[0]];
}
860243
function getListForItem(opts: Options, value: Value, item: Block): ?Block {
    const { document } = value;
    const parent = document.getParent(item.key);
    return parent && isList(opts, parent) ? parent : null;
}
504898
function get(obj, key) {
    var i, accessor = key.split('.'), empty = true;
    for (i=0; i<accessor.length; i++) {
      // empty string for key.that.does.not.exist
      if (!obj) return '';
      obj = obj[accessor[i]];
    }
    // empty string for every falsy value except 0
    if (obj === undefined || obj === null || obj === false) return '';
    // treat [] and {} as falsy also
    if (obj instanceof Array && obj.length == 0) return '';
    if (obj.constructor === Object) {
      for (i in obj) if (obj.hasOwnProperty(i)) empty = !i;
      if (empty) return '';
    }
    return obj;
  }
98206
function getset(key, value, req) {
  var val = this.getKey(key, req);
  this.setKey(key, value, undefined, undefined, undefined, req);
  return val || null;
}
1281208
@Override
    public Set<V> get(Object key)
    {
        Set<V> set = map.get(key);
        return set != null ? set : Collections.EMPTY_SET;
    }
683065
def iterallvalues(self, key=_absent):
        '''
        
        '''
        if key is not _absent:
            if key in self:
                return iter(self.getlist(key))
            raise KeyError(key)
        return self._items.itervalues()
314237
def get(self, **kwargs):
        
        for chain in self.chains:
            for key in kwargs:
                getter_name = "get_"+key
                # scan all possible getters
                if (hasattr(chain, getter_name)):
                    getter = getattr(chain, getter_name) # e.g. "get_address"
                    if (getter() == kwargs[key]):
                        return chain
        return None
1088675
function get(k, key, value, fields) {
  return accessor(
    function(d) { return key(d) === k ? value(d) : NaN; },
    fields,
    k + ''
  );
}
735523
@Override
	public List<V> get(Object key) {
		return (List<V>) super.get(key);
	}
407559
function _groupBy(collection, getter) {
        var result = {};
        var prop;

        forEach( collection, function( elm ) {
          prop = getter(elm);

          if(!result[prop]) {
            result[prop] = [];
          }
          result[prop].push(elm);
        });
        return result;
      }
20861
function getItems(obj, path) {
        var pathItems = Array.isArray(path) ? path : path.split('.'),
            elm = obj,
            items = [];

        pathItems.some(function (key, index) {
            var isLastKey = (index + 1 === pathItems.length);
            elm = elm[key];

            if (elm === undefined) {
                return false;
            }

            if (Array.isArray(elm)) {
                elm.forEach(function (val) {
                    if (isLastKey) {
                        items.push(val);
                    } else {
                        items = items.concat(getItems(val, pathItems.slice(index + 1)));
                    }
                });
                return true;
            }

            // not array, so, object or primitive
            if (isLastKey) {
                items.push(elm);
                return true;
            }

            return false;
        });

        return items;
    }
271531
function (key, def) {
                        if (angular.isArray(key)) {
                            var items = {};
                            angular.forEach(key, function (k) {
                                if (this.has(k)) items[k] = this._getItem(k);
                            }, this);

                            return items;
                        }

                        if (! this.has(key)) return arguments.length === 2 ? def : void 0;

                        return this._getItem(key);
                    }
1196894
@Override
  public List<V> get(Object key)
  {
    if (key == null) {
      return null;
    }

    K[] keys = _keys;
    int size = _size;
    
    for (int i = size - 1; i >= 0; i--) {
      if (key.equals(keys[i])) {
        return _values[i];
      }
    }
    return null;
  }