Returns an array containing the ids of the colors in the specified class.
3085
public int[] enumerateColorIds (String className)
    {
        // make sure the class exists
        ClassRecord record = getClassRecord(className);
        if (record == null) {
            return null;
        }

        int[] cids = new int[record.colors.size()];
        Iterator<ColorRecord> crecs = record.colors.values().iterator();
        for (int ii = 0; crecs.hasNext(); ii++) {
            cids[ii] = crecs.next().colorId;
        }
        return cids;
    }
1005763
def items(cls):
        
        return [
            cls.TRUE_COLOR,
            cls.FALSE_COLOR,
            cls.NDVI,
            cls.EVI
        ]
955818
def get_color_list(method_list):
    """"""
    color_list = []
    for method in method_list:
        color = tuple([random() for _ in range(3)])  # 随机颜色画线
        color_list.append(color)
    return color_list
1048132
public ColorRecord getColorRecord (int classId, int colorId)
    {
        ClassRecord record = getClassRecord(classId);
        if (record == null) {
            // if they request color class zero, we assume they're just
            // decoding a blank colorprint, otherwise we complain
            if (classId != 0) {
                log.warning("Requested unknown color class",
                    "classId", classId, "colorId", colorId, new Exception());
            }
            return null;
        }
        return record.colors.get(colorId);
    }
677317
public static function getClassAndAlias($class)
    {
        if (false !== strpos($class, ' ')) {
            list($class, $alias) = explode(' ', $class);
        } else {
            $alias = null;
        }
        if (0 === strpos($class, '\\')) {
            $class = substr($class, 1);
        }

        return [$class, $alias];
    }
1131758
public static function getAllClassTraits($class)
    {
        $results = [];

        foreach (array_merge([$class => $class], class_parents($class)) as $class) {
            $results += self::getAllTraits($class);
        }

        return array_unique($results);
    }
1181613
private function classLineage($class, $ident = null)
    {
        if (!is_string($class)) {
            return [];
        }

        if ($ident === null) {
            $ident = $this->metaKeyFromClassName($class);
        }

        if (isset(static::$lineageCache[$ident])) {
            return static::$lineageCache[$ident];
        }

        $class = $this->classNameFromMetaKey($ident);

        if (!class_exists($class) && !interface_exists($class)) {
            return [ $ident ];
        }

        $classes   = array_values(class_parents($class));
        $classes   = array_reverse($classes);
        $classes[] = $class;

        $hierarchy = [];
        foreach ($classes as $class) {
            $implements = array_values(class_implements($class));
            $implements = array_reverse($implements);
            foreach ($implements as $interface) {
                $hierarchy[$this->metaKeyFromClassName($interface)] = 1;
            }
            $hierarchy[$this->metaKeyFromClassName($class)] = 1;
        }

        $hierarchy = array_keys($hierarchy);

        static::$lineageCache[$ident] = $hierarchy;

        return $hierarchy;
    }
1321108
function getIdColumns(idColumnNames, columns) {
  if (!defined(idColumnNames)) {
    return [];
  }
  return idColumnNames.map(name => getColumnWithNameIdOrIndex(name, columns));
}
190335
public function getAllClasses($class, bool $autoload = true): array
    {
        if (is_object($class)) {
            $class = get_class($class);
        }

        if (!isset($this->classes[$class])) {
            $classes = array_merge([ltrim($class, '\\')],
                                   $resultClassParents = @class_parents($class, $autoload),
                                   $resultClassImplements = @class_implements($class, $autoload));

            if ($resultClassParents === false || $resultClassImplements === false) {
                throw new ClassIndexException(sprintf('Unable to get all classes of class "%s"', $class));
            }

            $this->classes[$class] = array_unique($classes);
        }

        return $this->classes[$class];
    }
124152
public static Class<?>[] getTypes(Object[] objects) {
        if (!Checker.isNull(objects)) {
            Class<?>[] classes = new Class<?>[objects.length];
            int i = 0;
            for (Object object : objects) {
                classes[i++] = Checker.isNull(object) ? null : object.getClass();
            }
            return classes;
        }
        return null;
    }
1038970
public static function getByClass( $class )
	{
		$results = [];
		foreach ( static::$globals as $k => $v )
			if ( $v instanceof $class )
				$results[$k] = $v;
		return $results;
	}
777285
public function getIds(): array {
        $ids  = array($this->id);
        $meta = $this->getMetadata();
        foreach ($meta->allResources(RC::idProp()) as $id) {
            $ids[] = $id->getUri();
        }
        $ids = array_unique($ids);
        return $ids;
    }
539814
public function getAttributeKeys($class = null) {
		foreach($this as $key => $data) {
			if($class) {
				if($data instanceof $class)
					$ret[] = $key;
			} else {
				$ret[] = $key;
			}
		}
		return $ret;
	}
843732
def classname_list(p)
      classes = []
      while cls = p.hw.ident_chain
        classes << cls
      end
      classes
    end
778182
public function databaseIndexes($class, $aggregated = true)
    {
        $class = ClassInfo::class_name($class);
        if ($class === DataObject::class) {
            return [];
        }
        $this->cacheDatabaseIndexes($class);
        $indexes = $this->databaseIndexes[$class];
        if (!$aggregated) {
            return $indexes;
        }
        return array_merge($indexes, $this->databaseIndexes(get_parent_class($class)));
    }
1220360
function getClassNames(classes) {
  if (!classes) {
    throw new BuildException(
      exceptions.NullPointer, 'The classes object cannot be nil.');
  }
  const object = {};
  Object.keys(classes).forEach((classId) => {
    object[classId] = classes[classId].name;
  });
  return object;
}
1237190
function getColorGroups(colors) {
  var colorGroups = [];

  colors.forEach(function (color) {
    if (colorGroups.indexOf(color.group) < 0) {
      colorGroups.push(color.group);
    }
  });

  return colorGroups;
}