(Internal) Determines if an element or space separated list of class names contains a class name.
336364
function hasClass(element, name) {
    var list = typeof element == 'string' ? element : classList(element);
    return list.indexOf(' ' + name + ' ') >= 0;
  }
193082
def class_filter(classes, class_name):
    
    result_classes = classes
    if isinstance(class_name, list):
        if set(class_name) <= set(classes):
            result_classes = class_name
    return result_classes
1200162
private boolean isAssociatedClass(@DottedClassName String calledClass) {
        if (calledClass.equals(parentClassName)) {
            return true;
        }

        if (calledClass.length() <= clsName.length()) {
            return false;
        }
        int innerMarkPos = calledClass.indexOf('$', clsName.length());
        if (innerMarkPos < 0) {
            innerMarkPos = calledClass.indexOf('.', clsName.length());
            if (innerMarkPos < 0) {
                return false;
            }
        }

        String topClass = calledClass.substring(0, innerMarkPos);
        return topClass.equals(clsName) || calledClass.substring(innerMarkPos + 1).startsWith("access");
    }
241832
public static boolean isClassPresent(String classname) {
		try {
			Class.forName(classname);
			return true;
		} catch (ClassNotFoundException e) {

		}
		return false;
	}
55485
function (node) {
    const parent = node.parentNode
    return parent.classList.contains('code') && parent.nodeName === 'TD' && node.nodeName === 'PRE'
  }
470364
public <T extends AbstractJaxb> boolean hasCssClass(String clazz) {
        boolean result = false;
        List<String> classList = this.getCssClass();
        if (classList != null && classList.contains(clazz)) {
            result = true;
        }
        return result;
    }
1121217
def getElementsByClassName(start_node: ParentNode, class_name: str
                           ) -> NodeList:
    """"""
    classes = set(class_name.split(' '))
    return getElementsBy(
        start_node,
        lambda node: classes.issubset(set(node.classList))
    )
805968
private boolean containsElements(final Collection<?> coll) {
        if (coll == null || coll.isEmpty()) {
            return false;
        }
        for (final Object name : coll) {
            if (name != null) {
                return true;
            }
        }
        return false;
    }
43153
function hasClass(el, className) {
    if (!el || !className) {
      return;
    }
    return (new RegExp('(^|\\s)' + className + '(\\s|$)').test(el.className));
  }
976309
function(element, name) {
        var names = element.className;
        return (!!names && new RegExp("(^|\\s)" + name + "(\\s|$)").test(names));
    }
368079
def has_class(self, classname):
        
        def element_has_class():
            """Wrapper to test if element has a class"""
            pattern = re.compile('(\s|^){classname}(\s|$)'.format(classname=classname))
            classes = self.element.get_attribute('class')
            matches = re.search(pattern, classes)

            if matches is not None:
                return True
            return False

        return self.execute_and_handle_webelement_exceptions(
            element_has_class,
            'check for element class "{}"'.format(classname)
        )
140303
public boolean containsElement(Element element) {
        String deepName = getDeepName(element);
        return elementNameSortOrderMap.containsKey(deepName);
    }
1295575
def matches(self, tag, id, classes):
        
        element = self.elements[0]
        unmatched_ids = [name[1:] for name in element.names if name.startswith('#')]
        unmatched_classes = [name[1:] for name in element.names if name.startswith('.')]
        unmatched_tags = [name for name in element.names if name is not '*' and not name.startswith('#') and not name.startswith('.')]
        
        if tag and tag in unmatched_tags:
            unmatched_tags.remove(tag)

        if id and id in unmatched_ids:
            unmatched_ids.remove(id)

        for class_ in classes:
            if class_ in unmatched_classes:
                unmatched_classes.remove(class_)
        
        if unmatched_tags or unmatched_ids or unmatched_classes:
            return False

        else:
            return True
978743
function(element, className) {
    invariant(
      !/\s/.test(className),
      'CSSCore.addClass takes only a single class name. "%s" contains ' +
      'multiple classes.', className
    );

    if (className) {
      if (element.classList) {
        element.classList.add(className);
      } else if (!CSSCore.hasClass(element, className)) {
        element.className = element.className + ' ' + className;
      }
    }
    return element;
  }
14498
static private Class findClassFor(String s) throws ClassNotFoundException
	{ 
		int endClassIndex = s.indexOf('[');
		if (endClassIndex>=0) s = s.substring(0,endClassIndex);
		try {
			return Class.forName(s);
		} catch (ClassNotFoundException e) {
			return Class.forName("com.wcohen.ss."+s);
		}
	}
181035
public static boolean contains(Iterator<?> iterator, Object element) {
        if (iterator != null) {
            while (iterator.hasNext()) {
                Object candidate = iterator.next();
                if (ObjectUtils.nullSafeEquals(candidate, element)) {
                    return true;
                }
            }
        }
        return false;
    }
1073002
private static boolean hasConflictingClassName(DescriptorProto messageDesc, String name) {
    if (name.equals(messageDesc.getName())) {
      return true;
    }
    for (EnumDescriptorProto enumDesc : messageDesc.getEnumTypeList()) {
      if (name.equals(enumDesc.getName())) {
        return true;
      }
    }
    for (DescriptorProto nestedMessageDesc : messageDesc.getNestedTypeList()) {
      if (hasConflictingClassName(nestedMessageDesc, name)) {
        return true;
      }
    }
    return false;
  }