De una list<Object> o una List<List<Object>> coge todas las features y las mete en la misma estructura de datos.
973309
private List<?> joinFeatures(List<?> list) {
        List result = new ArrayList<Object>();

        for (Object object : list) {
            int start = -1;
            int end = -1;

            if (object instanceof Gene) {
                result.add(object);
                start = ((Gene) object).getStart();
                end = ((Gene) object).getEnd();
            }

            if (object instanceof RegulatoryRegion) {
                result.add(object);
                start = ((RegulatoryRegion) object).getStart();
                end = ((RegulatoryRegion) object).getEnd();
            }

            if (object instanceof List) {
                result.addAll(joinFeatures((List) object));
            }

            /* Acutualizamos los valores maximo de end y minimo de start */
            if ((start != -1) && (start < min_start)) {
                min_start = start;
            }

            if ((end != -1) && (end > max_end)) {
                max_end = end;
            }
        }

        return result;
    }
167153
public function listCache()
    {

        $newlist = array();

        foreach ($this->cacheListing as $key => $val) {
            $newlist [$key] = new \stdClass();

            foreach ($val as $skey => $sval) {
                $newlist [$key]->$skey = $sval;
            }
        }

        $this->list = $newlist;

        return true;
    }
230596
public function dataFromObject()
    {
        $obj             = $this->proto();
        $metadata        = $obj->metadata();
        $adminMetadata   = isset($metadata['admin']) ? $metadata['admin'] : null;
        $collectionIdent = $this->collectionIdent();
        if (!$collectionIdent) {
            $collectionIdent = isset($adminMetadata['default_list']) ? $adminMetadata['default_list'] : '';
        }

        if (isset($adminMetadata['lists'][$collectionIdent])) {
            return $adminMetadata['lists'][$collectionIdent];
        } else {
            return [];
        }
    }
818620
function M(list, assimilateSublists) {
    var self = this, idx = 0;
    if (list)
      for (var i = 0, len = list.length; i < len; i++) {
        var item = list[i];
        if (assimilateSublists && isList(item))
          for (var j = 0, len2 = item.length; j < len2; j++)
            self[idx++] = item[j];
        else
          self[idx++] = item;
      }
    else
      self[idx++] = assimilateSublists;

    self['length'] = idx;
    self['_'] = true;
  }
1182460
public function propertiesIdents()
    {
        $metadata = $this->proto()->metadata();
        if (isset($metadata['admin']['lists'])) {
            $adminMetadata   = $metadata['admin'];
            $collectionIdent = $this->collectionIdent();
            if (isset($adminMetadata['lists'][$collectionIdent]['properties'])) {
                return $adminMetadata['lists'][$collectionIdent]['properties'];
            }
        }

        return [];
    }
647971
def writeList(self, a):
        
        if self.writeReference(a) != -1:
            return

        self.context.addObject(a)

        self.writeType(TYPE_ARRAY)
        self.stream.write_ulong(len(a))

        for data in a:
            self.writeElement(data)
604300
public function getModels()
    {
        $tables = $this->driver->getTablesNames();
        $pivotTables = $this->getConfig('pivot_tables', []);

        foreach ($tables as $table) {
            // Crée l'instance du modèle pour la table correspondante
            $this->models[$table] = $this->createModel($table);

            // Crée l'instance du pivot si la table est définie ou reconnue comme tel
            if (array_key_exists($table, $pivotTables)) {
                if ($pivotTables[$table] !== null) {
                    $this->pivots[$table] = new Pivot($table, $pivotTables[$table]);
                }
            }
            elseif (in_array($table, $pivotTables) || strpos($table, '_has_') !== false) {
                $this->pivots[$table] = new Pivot($table);
            }
        }

        // Ajoute les relations 1-n et 1-1 selon les contraintes définies dans la BDD
        foreach ($this->models as $model) {
            $this->addRelationsAccordingToConstraints($model);
        }

        // Ajoute les relations n-n via les instances des pivots
        foreach ($this->pivots as $pivot) {
            $pivot->addBelongsToManyRelationsToRelatedModels();
        }

        // Ajoute les relations polymorphiques selon les informations renseignées dans la config
        foreach ($this->getConfig('polymorphic_relations', []) as $relation => $relatedTables) {
            list($table, $morphName) = explode('.', $relation);

            $this->addPolymorphicRelations($this->models[$table], $morphName, $relatedTables);
        }

        return $this->models;
    }
1226309
protected function _shimRelations() {
		if (!empty($this->belongsTo)) {
			foreach ($this->belongsTo as $k => $v) {
				if (is_int($k)) {
					$k = $v;
					$v = [];
				}
				$v = $this->_parseRelation($v);
				$this->belongsTo(Inflector::pluralize($k), $v);
			}
		}
		if (!empty($this->hasOne)) {
			foreach ($this->hasOne as $k => $v) {
				if (is_int($k)) {
					$k = $v;
					$v = [];
				}
				$v = $this->_parseRelation($v);
				$this->hasOne(Inflector::pluralize($k), $v);
			}
		}
		if (!empty($this->hasMany)) {
			foreach ($this->hasMany as $k => $v) {
				if (is_int($k)) {
					$k = $v;
					$v = [];
				}
				$v = $this->_parseRelation($v);
				$this->hasMany(Inflector::pluralize($k), $v);
			}
		}
		if (!empty($this->hasAndBelongsToMany)) {
			foreach ($this->hasAndBelongsToMany as $k => $v) {
				if (is_int($k)) {
					$k = $v;
					$v = [];
				}
				$v = $this->_parseRelation($v);
				$this->belongsToMany(Inflector::pluralize($k), $v);
			}
		}
	}
44014
function endList()
    {
        $listItemArray = array();
        // Buils list item array
        foreach ( $this->DocumentStack[$this->CurrentStackNumber]['ChildArray'] as $listItem )
        {
            $listItemArray[] = array( 'Type' => 'listitem',
                                      'Content' => $listItem );
        }

        $this->CurrentStackNumber -= 1;

        if ( $this->CurrentStackNumber == 0 )
        {
            $this->DocumentArray[] = array( 'Type' => 'list',
                                            'ListType' => $this->DocumentStack[$this->CurrentStackNumber + 1]['ListType'],
                                            'Content' => $listItemArray );
        }
        else
        {
            $elementArray = array( 'Type' => 'list',
                                   'ListType' => $this->DocumentStack[$this->CurrentStackNumber + 1]['ListType'],
                                   'Content' => $listItemArray );

            $this->addElement( $elementArray );
        }
    }
1372399
def is_list(self, key):
        """"""
        data = self.model.get_data()
        return isinstance(data[key], (tuple, list))
583987
public function getListObjectInherited()
    {
        return $this->owner->ListInherit ? $this->owner->getParent()->getListObject() : $this->owner->getListObject();
    }
627979
def _listify(collection):
        """"""
        new_list = []
        for index in range(len(collection)):
            new_list.append(collection[index])
        return new_list
386828
void get_basic_features(final Context ctx,
                            final List<Integer> forms,
                            final List<Integer> postags,
                            final List<Integer> deprels,
                            List<Integer> features)
    {
        PUSH(features, FORM(forms, ctx.S0));
        PUSH(features, POSTAG(postags, ctx.S0));
        PUSH(features, FORM(forms, ctx.S1));
        PUSH(features, POSTAG(postags, ctx.S1));
        PUSH(features, FORM(forms, ctx.S2));
        PUSH(features, POSTAG(postags, ctx.S2));
        PUSH(features, FORM(forms, ctx.N0));
        PUSH(features, POSTAG(postags, ctx.N0));
        PUSH(features, FORM(forms, ctx.N1));
        PUSH(features, POSTAG(postags, ctx.N1));
        PUSH(features, FORM(forms, ctx.N2));
        PUSH(features, POSTAG(postags, ctx.N2));
        PUSH(features, FORM(forms, ctx.S0L));
        PUSH(features, POSTAG(postags, ctx.S0L));
        PUSH(features, DEPREL(deprels, ctx.S0L));
        PUSH(features, FORM(forms, ctx.S0R));
        PUSH(features, POSTAG(postags, ctx.S0R));
        PUSH(features, DEPREL(deprels, ctx.S0R));
        PUSH(features, FORM(forms, ctx.S0L2));
        PUSH(features, POSTAG(postags, ctx.S0L2));
        PUSH(features, DEPREL(deprels, ctx.S0L2));
        PUSH(features, FORM(forms, ctx.S0R2));
        PUSH(features, POSTAG(postags, ctx.S0R2));
        PUSH(features, DEPREL(deprels, ctx.S0R2));
        PUSH(features, FORM(forms, ctx.S0LL));
        PUSH(features, POSTAG(postags, ctx.S0LL));
        PUSH(features, DEPREL(deprels, ctx.S0LL));
        PUSH(features, FORM(forms, ctx.S0RR));
        PUSH(features, POSTAG(postags, ctx.S0RR));
        PUSH(features, DEPREL(deprels, ctx.S0RR));
        PUSH(features, FORM(forms, ctx.S1L));
        PUSH(features, POSTAG(postags, ctx.S1L));
        PUSH(features, DEPREL(deprels, ctx.S1L));
        PUSH(features, FORM(forms, ctx.S1R));
        PUSH(features, POSTAG(postags, ctx.S1R));
        PUSH(features, DEPREL(deprels, ctx.S1R));
        PUSH(features, FORM(forms, ctx.S1L2));
        PUSH(features, POSTAG(postags, ctx.S1L2));
        PUSH(features, DEPREL(deprels, ctx.S1L2));
        PUSH(features, FORM(forms, ctx.S1R2));
        PUSH(features, POSTAG(postags, ctx.S1R2));
        PUSH(features, DEPREL(deprels, ctx.S1R2));
        PUSH(features, FORM(forms, ctx.S1LL));
        PUSH(features, POSTAG(postags, ctx.S1LL));
        PUSH(features, DEPREL(deprels, ctx.S1LL));
        PUSH(features, FORM(forms, ctx.S1RR));
        PUSH(features, POSTAG(postags, ctx.S1RR));
        PUSH(features, DEPREL(deprels, ctx.S1RR));
    }
1085351
function(list) {
            if (!isArray(list.value))
                return list;

            var listType, row, rowType;
            rowType  = list.type;
            list     = list.value;
            listType = list[0].type;
            row      = list[0].value;

            list = (isArray(row) ? row : [row]).map(function(col, i) {
                return newLessList(list.map(function(row) {
                    return (isArray(row.value)
                        ? row.value : [row])[i]
                            || new Node();
                }), rowType);
            });

            return newLessList(list, listType);
        }
867083
def asList(self):
        
        base = [self._x, self._y]
        if not self._z is None:
            base.append(self._z)
        elif not self._m is None:
            base.append(self._m)
        return base
85880
public static function getRows($object, $objectId, $year = null, $month = null, $day = null, $hour = null)
    {
        //nowa quera filtrująca po obiekcie i ID
        $q = (new Orm\CmsStatDateQuery)
                ->whereObject()->equals($object)
                ->andFieldObjectId()->equals($objectId);
        //wiązanie roku
        self::_bindParam($q, 'year', $year);
        //wiązanie miesiąca
        self::_bindParam($q, 'month', $month);
        //wiązanie dnia
        self::_bindParam($q, 'day', $day);
        //wiązanie godziny
        self::_bindParam($q, 'hour', $hour);

        //sortowanie i zwrot
        return $q->orderAsc('day')
                ->orderAsc('month')
                ->orderAsc('year')
                ->orderAsc('hour')
                ->find();
    }
876232
def list(self):
        """"""
        return [self._pos3d.x, self._pos3d.y, self._pos3d.z]