Removes a {@link AttributeAccess.Flag special purpose flag} from the set of those relevant to the attribute
@param flag the flag
@return a builder that can be used to continue building the attribute definition
969047
@SuppressWarnings({"deprecation", "UnusedReturnValue", "WeakerAccess"})
    public BUILDER removeFlag(final AttributeAccess.Flag flag) {
        if (!isFlagPresent(flag)) {
            return (BUILDER) this; //if not present no need to remove
        }
        final int length = flags.length;
        final AttributeAccess.Flag[] newFlags = new AttributeAccess.Flag[length - 1];
        int k = 0;
        for (AttributeAccess.Flag flag1 : flags) {
            if (flag1 != flag) {
                newFlags[k] = flag1;
                k++;
            }
        }
        //noinspection deprecation
        flags = newFlags;
        return (BUILDER) this;
    }
1108915
public static String asString(Boolean flag) {
		return flag == null ? null : (flag ? YES_AS_STRING : NO_AS_STRING);
	}
1009989
public static Object removeAttribute(String key) {
		Object value = localAttributeHolder.get().remove(key);
		if(value == null) {
			value = inheritableAttributeHolder.get().remove(key);
		} else {
			inheritableAttributeHolder.get().remove(key);
		}
		return value;
	}
75923
public static long flags(JCTree tree) {
        switch (tree.getTag()) {
        case VARDEF:
            return ((JCVariableDecl) tree).mods.flags;
        case METHODDEF:
            return ((JCMethodDecl) tree).mods.flags;
        case CLASSDEF:
            return ((JCClassDecl) tree).mods.flags;
        case BLOCK:
            return ((JCBlock) tree).flags;
        default:
            return 0;
        }
    }
450986
public void setFlag(CodecFlag flag) throws JavaAVException {
		if (flag == null)
			throw new JavaAVException("Could not set codec flag. Null provided.");

		flags.add(flag);
	}
955002
public CmsResourceFilter addExcludeFlags(int flags) {

        CmsResourceFilter extendedFilter = (CmsResourceFilter)clone();

        extendedFilter.m_flags = flags;
        extendedFilter.m_filterFlags = EXCLUDED;
        extendedFilter.updateCacheId();

        return extendedFilter;
    }
1201891
public <T extends ViewHandler<R>> T processing(boolean flag) {
        lock.lock();
        try {
            setProcessing(flag);
            return (T)this;
        }
        finally {
            lock.unlock();
        }
    }
86186
public void setUnidirectional(boolean flag) {
        if (flag) {
            ext.setOidValue(_DIALG_UNI);
            // super.oidValue = _DIALG_UNI;
        } else {
            ext.setOidValue(_DIALG_STRUCTURED);
            // super.oidValue = _DIALG_STRUCTURED;
        }
        this.uniDirectional = flag;

    }
1234105
function (flagOrBuilder) {
		if (_.isFunction(flagOrBuilder)) {
			this.object(flagOrBuilder);
		}

		if (flagOrBuilder == null || flagOrBuilder) {
			this.isArray = true;
		} else {
			delete this.isArray;
		}

		return this;
	}
1349517
protected function setFlag($flag, $enable = true)
    {
        if ($enable) {
            $this->flags[$flag] = true;
        } else {
            unset($this->flags[$flag]);
        }
    }
889248
public function setFlag($flag, $enabled = true)
    {
        if ($enabled) {
            $this->flags |= $flag;
        } else {
            $this->flags &= ~$flag;
        }

        return $this;
    }
1214773
public CmsResourceFilter addRequireFlags(int flags) {

        CmsResourceFilter extendedFilter = (CmsResourceFilter)clone();

        extendedFilter.m_flags = flags;
        extendedFilter.m_filterFlags = REQUIRED;
        extendedFilter.updateCacheId();

        return extendedFilter;
    }
1212006
function  ( flag ){
    if( flag === undefined ) flag = true;
    this._dat[ 0|SCISSOR_ENABLE ] = flag|0;
    this._set |= SCISSOR_ENABLE_SET|0;
    return this;
  }
1311483
Set<RequiresFlag> readRequiresFlags(int flags) {
        Set<RequiresFlag> set = EnumSet.noneOf(RequiresFlag.class);
        for (RequiresFlag f: RequiresFlag.values()) {
            if ((flags & f.value) != 0)
                set.add(f);
        }
        return set;
    }
1265491
public static Pattern remove(String regex, int flags) {
		return POOL.remove(new RegexWithFlag(regex, flags));
	}
1247732
@WithBridgeMethods(value = SQLInsertClause.class, castRequired = true)
    public C addFlag(Position position, Expression<?> flag) {
        metadata.addFlag(new QueryFlag(position, flag));
        return (C) this;
    }
517353
private function remove_flag_from_message($messageid, $flag) {
        // Get the current mailbox.
        $mailbox = $this->get_mailbox();

        // Mark it as read to lock the message.
        $this->client->store($mailbox, array(
            'ids' => $messageid,
            'delete' => $flag,
        ));
    }