Adds standard ACE object flag.

@param flag standard ACE object flag.
@return the current ACE object flags.
492907
public AceObjectFlags addFlag(final Flag flag) {
        if (!flags.contains(flag)) {
            flags.add(flag);
        }
        return this;
    }
105461
def add_flag_values(self, entry, flag):
        '''  '''
        if flag in self.flags:
            self.flags[flag].append(entry)
299727
public static Boolean asBoolean(String flag) {
		return flag == null ? null : flag.equals(YES_AS_STRING);
	}
1070471
Set<ExportsFlag> readExportsFlags(int flags) {
        Set<ExportsFlag> set = EnumSet.noneOf(ExportsFlag.class);
        for (ExportsFlag f: ExportsFlag.values()) {
            if ((flags & f.value) != 0)
                set.add(f);
        }
        return set;
    }
1152511
public void setAceFlags(String aceFlags) {

        try {
            m_aceFlags = Integer.parseInt(aceFlags);
        } catch (Throwable e) {
            m_throwable = e;
        }
    }
148599
private IAtomContainer setFlags(IAtomContainer container, IAtomContainer ac, boolean b) {
        for (Iterator<IAtom> it = container.atoms().iterator(); it.hasNext();) {
            int positionA = ac.indexOf(it.next());
            ac.getAtom(positionA).setFlag(CDKConstants.REACTIVE_CENTER, b);
        }
        for (Iterator<IBond> it = container.bonds().iterator(); it.hasNext();) {
            int positionB = ac.indexOf(it.next());
            ac.getBond(positionB).setFlag(CDKConstants.REACTIVE_CENTER, b);

        }
        return ac;
    }
156693
@Override
    @SuppressWarnings("unchecked")
    public Q addJoinFlag(String flag, JoinFlag.Position position) {
        queryMixin.addJoinFlag(new JoinFlag(flag, position));
        return (Q) this;
    }
104522
public ListParameterization addFlag(OptionID optionid) {
    parameters.add(new ParameterPair(optionid, Flag.SET));
    return this;
  }
736509
public ZooJdoProperties setRetainValues(boolean flag) {
    	DBTracer.logCall(this, flag); 
		put(Constants.PROPERTY_RETAIN_VALUES, Boolean.toString(flag));
		return this;
	}
1229835
def add_tcp_flag(self, tcp_flag):
        """"""

        if tcp_flag not in [1, 2, 4, 8, 16, 32, 64, 128]:
            raise ValueError("Invalid TCP flag. Valid: [1, 2, 4, 8, 16,32, 64, 128]")

        prev_size = 0

        if self._json_dict.get('tcp_flags') is None:
            self._json_dict['tcp_flags'] = 0
        else:
            prev_size = len(str(self._json_dict['tcp_flags'])) + len('tcp_flags') + 3  # str, key, key quotes, colon
        self._json_dict['tcp_flags'] |= tcp_flag

        # update size
        new_size = len(str(self._json_dict['tcp_flags'])) + len('tcp_flags') + 3  # str, key, key quotes, colon
        self._size += new_size - prev_size

        if prev_size == 0 and self._has_field:
            # add the comma and space
            self._size += 2
        self._has_field = True
384307
public int change( final int    add,
                       final int    remove )
    {
        for (;;)
        {
            int    current = _flags.get();
            int    newValue = ( current | add ) & ~remove;

            if ( _flags.compareAndSet( current, newValue ) )
            {
                return current;
            }
        }
    }
1186318
public void setEnable(boolean flag) {
        if (flag == mIsEnabled)
            return;

        mIsEnabled = flag;

        if (getNative() != 0)
        {
            NativeComponent.setEnable(getNative(), flag);
        }
        if (flag)
        {
            onEnable();
        }
        else
        {
            onDisable();
        }
    }
739813
public static void addGeometryToSegments(Geometry geometry, int flag, ArrayList<SegmentString> segments) {
        for (int i = 0; i < geometry.getNumGeometries(); i++) {
            Geometry component = geometry.getGeometryN(i);
            if (component instanceof Polygon) {
                add((Polygon) component, flag, segments);
            } else if (component instanceof LineString) {
                add((LineString) component, flag, segments);
            }
        }
    }
313053
protected void addContainerTags() {
	// Only add root if we aren't it
	final RootContainer rc = getRootContainer(container);
	if (rc != null) {
	    tags.add(rc);
	}

	final TreeDepth parentDepth = getTreeDepth(container);
	tags.add(parentDepth != null ? parentDepth.increment() : TreeDepth.ROOT);
    }
167651
public int unset( final int    flags )
    {
        for (;;)
        {
            int    current = _flags.get();
            int    newValue = current & ~flags;

            if ( _flags.compareAndSet( current, newValue ) )
            {
                return current;
            }
        }
    }
1207773
public void setOrderFlags(final int flags) {
		orderFlags = Arrays.
				stream(BitfinexOrderFlag.values())
				.filter(f -> ((f.getFlag() & flags) == f.getFlag()))
				.collect(Collectors.toSet());
	}
1188019
def add_threading(self, flag):
		
		threads = min(int(config.get_resource('threads')), self.max_concurrency)
		if threads > 1:
			self.args.append(flag)
			self.args.append(threads)