/*! check if field is a part of dataset

@param name
name of field
@param collection
collection, against which check will be done, $text collection by default
@return
returns true if field already a part of dataset, otherwise returns true
972593
public function is_field($name,$collection = false){
		if (!$collection)
			$collection=$this->text;
			
		for ($i=0; $i<sizeof($collection); $i++)
			if ($collection[$i]["name"] == $name || $collection[$i]["db_name"] == $name)	return $i;
		return -1;
	}
1049713
public function hasFilter($name)
    {
        foreach ($this->filters as $filter) {
            if ($filter->getFieldName() === $name) {
                return true;
            }
        }
    
        return false;
    }
91248
public boolean containsString (String text)
    {
        for (int ii = 0, nn = _lines.size(); ii < nn; ii++) {
            // don't look inside the autogenerated areas
            if (!(ii >= _nstart && ii < _nend) && !(ii >= _mstart && ii < _mend) &&
                    _lines.get(ii).contains(text)) {
                return true;
            }
        }
        return false;
    }
1297284
public function isFieldSet(string $name) : bool
    {
        if (!$this->fetchForm()) {
            return false;
        }

        $name      = trim($name);
        $field_key = array_search($name, $this->keys);
        return isset($this->method[$field_key]) ?: isset($_FILES[$field_key]);
    }
1132788
public static boolean isCollection(EntityDataModel entityDataModel, String typeName) {
        EntitySet entitySet = entityDataModel.getEntityContainer().getEntitySet(typeName);
        if (entitySet != null) {
            return true;
        }
        try {
            if (Collection.class.isAssignableFrom(Class.forName(typeName))
                    || COLLECTION_PATTERN.matcher(typeName).matches()) {
                return true;
            }
        } catch (ClassNotFoundException e) {
            LOG.debug("Not possible to find class for type name: {}", typeName);
        }

        return false;
    }
1250758
public function isCollectionValuedAssociation($fieldName) : bool
    {
        return isset($this->associationMappings[$fieldName]['type']) &&
            $this->associationMappings[$fieldName]['type'] === 'many';
    }
1304853
private boolean isCollectionAttribute(PluralAttribute<? super X, ?, ?> attribute)
    {
        return attribute != null && attribute.getCollectionType().equals(CollectionType.COLLECTION);
    }
224442
private function userHasRequestedARegistrationOnCollection(\collection $collection, $userData)
    {
        if (null === $userRegistration = igorw\get_in($userData, [$collection->get_sbas_id(), $collection->get_base_id()])) {
            return false;
        }

        return !is_null($userRegistration['active']);
    }
46058
public function is_set($field) {
        return (isset($this->data[$field]) || isset($this->extradata[$field]));
    }
416866
public static void checkDatasetName(String namespace, String name) {
    Preconditions.checkNotNull(namespace, "Namespace cannot be null");
    Preconditions.checkNotNull(name, "Dataset name cannot be null");
    ValidationException.check(Compatibility.isCompatibleName(namespace),
        "Namespace %s is not alphanumeric (plus '_')",
        namespace);
    ValidationException.check(Compatibility.isCompatibleName(name),
        "Dataset name %s is not alphanumeric (plus '_')",
        name);
  }
809801
public boolean isSet(_Fields field) {
    if (field == null) {
      throw new IllegalArgumentException();
    }

    switch (field) {
    case STATUS:
      return isSetStatus();
    case HAS_RESULT_SET:
      return isSetHasResultSet();
    case QUERY_DATA_SET:
      return isSetQueryDataSet();
    }
    throw new IllegalStateException();
  }
1331227
def does_field_exist(self,collection,field_name):
        '''
        
        '''
        schema = self.get_schema_fields(collection)
        logging.info(schema)
        return True if field_name in [field['name'] for field in schema['fields']] else False
1124796
public static function hasCustomfield($name = null)
    {

        $customfields = $this->getAssignedCustomfields();
        if (empty($customfields)) {
            return false;
        }
        foreach ($customfields as $customfield) {
            if ($customfield->getName() !== $name) {
                continue;
            }
            return true;
        }
        return false;
    }
460647
public boolean containsKey(String name)
    {
        FieldInfo info=getFieldInfo(name);
        return getField(info,true)!=null;
    }
135645
public function findOrFalse($field, $name) {
        $module = ModuleModel::where($field, $name)->first();
        return !is_null($module) ? $module : false;
    }
987181
public function isField(DataObject $object, $name)
    {
        return (
            !$this->isRelation($object, $name) &&
            !$this->isObject($object, $name) &&
            !$this->isChild($object, $name)
        );
    }
575391
private boolean isCtFieldACollection(CtField ctField) {
        try {
            return ctField.getType().equals(cp.get(Collection.class.getName()))
                    || ctField.getType().equals(cp.get(List.class.getName()))
                    || ctField.getType().equals(cp.get(Set.class.getName())) ;
        } catch (NotFoundException e) {
            e.printStackTrace();
            return false;
        }
    }