/*
Get a list of direct child elements by class name.
334235
function childrenByClass(element, name) {
  var filtered = [];

  for (var i = 0; i < element.children.length; i++) {
    var child = element.children[i];
    var classNames = child.className.split(' ');
    if (classNames.indexOf(name) !== -1) {
      filtered.push(child);
    }
  }

  return filtered;
}
87085
function getChildByType(_class) {
         var objList = [];

         for (var i = this.children.length - 1; i >= 0; i--) {
           var obj = this.children[i];

           if (obj instanceof _class) {
             objList.push(obj);
           }

           if (obj instanceof me.Container) {
             objList = objList.concat(obj.getChildByType(_class));
           }
         }

         return objList;
       }
1150207
public static List<Element> getChildElements(final Element elem, final String ns, final String name) {
        final NodeList children =  elem.getChildNodes();
        final List<Element> res = new ArrayList<>(children.getLength());
        for (int i = 0; i < children.getLength(); i++) {
            final Node child = children.item(i);
            if (child.getNodeType() == Node.ELEMENT_NODE) {
                if (Objects.equals(child.getNamespaceURI(), ns) && name.equals(child.getLocalName())) {
                    res.add((Element) child);
                }
            }
        }
        return res;
    }
287590
def child_elements(self, by=By.ID, value=None, el_class=None):
        
        el, selector = define_selector(by, value, el_class)
        return self._init_element(elements.PageElementsList(selector, el))
1259839
public static List<String> getOtherChildren(CodeSystem cs, ConceptDefinitionComponent c) {
    List<String> res = new ArrayList<String>();
    for (ConceptPropertyComponent p : c.getProperty()) {
      if ("parent".equals(p.getCode())) {
        res.add(p.getValue().primitiveValue());
      }
    }
    return res;
  }
570806
def get_element_by_class_name_or_raise(self, class_name):
        """"""
        if class_name not in self._elements:
            raise InvalidClassError(u'Class does not exist: {}'.format(class_name))

        return self._elements[class_name]
927855
def get_class_list(cls) -> DOMTokenList:
        """"""
        cl = []
        cl.append(DOMTokenList(cls, cls.class_))
        if cls.inherit_class:
            for base_cls in cls.__bases__:
                if issubclass(base_cls, WdomElement):
                    cl.append(base_cls.get_class_list())
        # Reverse order so that parent's class comes to front  <- why?
        cl.reverse()
        return DOMTokenList(cls, *cl)
1141603
function getCommonSelectors (elements) {

  const { classes, attributes, tag } = getCommonProperties(elements)

  const selectorPath = []

  if (tag) {
    selectorPath.push(tag)
  }

  if (classes) {
    const classSelector = classes.map((name) => `.${name}`).join('')
    selectorPath.push(classSelector)
  }

  if (attributes) {
    const attributeSelector = Object.keys(attributes).reduce((parts, name) => {
      parts.push(`[${name}="${attributes[name]}"]`)
      return parts
    }, []).join('')
    selectorPath.push(attributeSelector)
  }

  if (selectorPath.length) {
    // TODO: check for parent-child relation
  }

  return [
    selectorPath.join('')
  ]
}
411858
private List<XsdElement> getAllElementsRecursively(XsdAbstractElement element) {
        List<XsdElement> allGroupElements = new ArrayList<>();
        List<XsdAbstractElement> directElements = element.getXsdElements().collect(Collectors.toList());

        allGroupElements.addAll(
                directElements.stream()
                        .filter(elem1 -> elem1 instanceof XsdElement)
                        .map(elem1 -> (XsdElement) elem1)
                        .collect(Collectors.toList()));

        for (XsdAbstractElement elem : directElements) {
            if ((elem instanceof XsdMultipleElements || elem instanceof XsdGroup) && elem.getXsdElements() != null) {
                allGroupElements.addAll(getAllElementsRecursively(elem));
            }
        }

        return allGroupElements;
    }
929828
public XMLElementList getChildrenByName(String name) {
		XMLElementList selected = new XMLElementList();
		XMLElementList children = getChildren();
		
		for (int i=0;i<children.size();i++) {
			if (children.get(i).getName().equals(name)) {
				selected.add(children.get(i));
			}
		}
		
		return selected;
	}
1350271
def GetChildClassId(self, classId):
		
		childList = []
		for ch in self.child:
			if ch.classId.lower() == classId.lower():
				childList.append(ch)
		return childList
1217202
def getElementsByAttr(self, attrName, attrValue):
        '''
            
        '''
        elements = []
        for child in self.children:
            if child.getAttribute(attrName) == attrValue:
                elements.append(child)
            elements += child.getElementsByAttr(attrName, attrValue)
        return TagCollection(elements)
148053
def get_children(self):
        """"""
        if hasattr(self, '_cached_children'):
            children = self._toplevel().objects.filter(
                pk__in=[n.pk for n in self._cached_children]
            )
            children._result_cache = self._cached_children
            return children
        else:
            return self.get_descendants(include_self=False, depth=1)
1285144
public <T extends ElementBase> Iterable<T> getChildren(Class<T> clazz) {
        return MiscUtil.iterableForType(children, clazz);
    }
507633
function getClasses(index$$1, element, row) {
      var _this$typedColumns$in = this.typedColumns[index$$1],
          typeDef = _this$typedColumns$in.typeDef,
          custom = _this$typedColumns$in["".concat(element, "Class")];

      var isRight = typeDef.isRight;
      if (this.rtl) isRight = true;
      var classes = {
        'vgt-right-align': isRight,
        'vgt-left-align': !isRight
      }; // for td we need to check if value is
      // a function.

      if (typeof custom === 'function') {
        classes[custom(row)] = true;
      } else if (typeof custom === 'string') {
        classes[custom] = true;
      }

      return classes;
    }
415689
def getChildren(current,calls,blacklist=[]):
    '''  '''
    return [c.target for c in calls if c.source==current and c.target not in blacklist]
543866
def get_children(self):
        """"""
        key = self.CHILDREN_KEY % self.pk
        #children = cache.get(key, None)
        # if children is None:
        children = super(Page, self).get_children()
        #cache.set(key, children)
        return children