Checks to see within the flags if a reload, i.e. not a full restart, is required.

@param flags the flags to check

@return {@code true} if a reload is required, otherwise {@code false}
431103
public static boolean requiresReload(final Set<Flag> flags) {
        return flags.contains(Flag.RESTART_ALL_SERVICES) || flags.contains(Flag.RESTART_RESOURCE_SERVICES);
    }
5555
public function has($flag)
    {
        // We'll extract the given flag into an array of possible flags, and
        // see if our AccountControl object contains any of them.
        $flagsUsed = array_intersect($this->extractFlags($flag), $this->values);

        return in_array($flag, $flagsUsed);
    }
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;
    }
166527
@SuppressWarnings({"deprecation", "WeakerAccess"})
    protected boolean isFlagPresent(final AttributeAccess.Flag flag) {
        if (flags == null) { return false; }
        for (AttributeAccess.Flag f : flags) {
            if (f.equals(flag)) { return true; }
        }
        return false;
    }
1283105
Set<OpensFlag> readOpensFlags(int flags) {
        Set<OpensFlag> set = EnumSet.noneOf(OpensFlag.class);
        for (OpensFlag f: OpensFlag.values()) {
            if ((flags & f.value) != 0)
                set.add(f);
        }
        return set;
    }
367441
public void setSetSignerOnThread(boolean flag) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
            Tr.debug(tc, "setSetSignerOnThread: " + flag);
        this.setSignerOnThread = flag;
    }
103754
public function hasFlags(array $flags, bool $matchAll = false) : bool
    {
        $matched = false;
        $userFlags = $this->getUserFlags();

        foreach ($flags as $flag) {
            if (in_array($flag, $userFlags)) {
                if ($matchAll) {
                    $matched = true;
                    continue;
                }

                $matched = true;
            } else {
                if ($matchAll) {
                    return false;
                }

                $matched = false;
            }
        }

        return $matched;
    }
985625
protected Boolean isOverWritingInherited(int flags) {

        if ((flags & CmsAccessControlEntry.ACCESS_FLAGS_OVERWRITE) > 0) {
            return Boolean.TRUE;
        }
        return Boolean.FALSE;
    }
993449
public static function hasFlag(string $flag) : bool
    {
        // Standardize the flag name - remove starting hyphens.
        $flag = ltrim($flag, '-');

        // Return the check right away if it's already cached.
        if (isset(static::$flags[$flag])) {
            return static::$flags[$flag];
        }

        // Grab the output of phpinfo(). If INFO_ALL is already available, we will just parse it instead of
        // fetching INFO_GENERAL specifically for our case. Then we are simply going to check if the --string
        // appears in the info.
        $result = strpos(static::$info[INFO_ALL] ?? static::getInfo(INFO_GENERAL), '--'.$flag);

        // Cache the result and return it.
        return static::$flags[$flag] = false !== $result;
    }
339759
public static boolean reload()
    {
        String biGramDictionaryPath = HanLP.Config.BiGramDictionaryPath;
        IOUtil.deleteFile(biGramDictionaryPath + ".table" + Predefine.BIN_EXT);

        return load(biGramDictionaryPath);
    }
213572
def has_flags(self, *flags):
        

        mask = sum(flags)
        return (self.bits & mask) == mask
933761
static boolean checkFlagConsistency(int flags, boolean hasWidth) {
    // Check that we specify at most one of 'prefix plus' and 'prefix space'.
    if ((flags & (FLAG_PREFIX_PLUS_FOR_POSITIVE_VALUES | FLAG_PREFIX_SPACE_FOR_POSITIVE_VALUES))
        == (FLAG_PREFIX_PLUS_FOR_POSITIVE_VALUES | FLAG_PREFIX_SPACE_FOR_POSITIVE_VALUES)) {
      return false;
    }
    // Check that we specify at most one of 'left align' and 'leading zeros'.
    if ((flags & (FLAG_LEFT_ALIGN | FLAG_SHOW_LEADING_ZEROS))
        == (FLAG_LEFT_ALIGN | FLAG_SHOW_LEADING_ZEROS)) {
      return false;
    }
    // Check that if 'left align' or 'leading zeros' is specified, we also have a width value.
    if ((flags & (FLAG_LEFT_ALIGN | FLAG_SHOW_LEADING_ZEROS)) != 0 && !hasWidth) {
      return false;
    }
    return true;
  }
452164
public boolean isSet(_Fields field) {
    if (field == null) {
      throw new IllegalArgumentException();
    }

    switch (field) {
    case RESTART_FLAG:
      return isSetRestartFlag();
    }
    throw new IllegalStateException();
  }
1214773
public CmsResourceFilter addRequireFlags(int flags) {

        CmsResourceFilter extendedFilter = (CmsResourceFilter)clone();

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

        return extendedFilter;
    }
336128
public boolean needsRefresh() {
        boolean needsRefresh;

        this.refreshLock.readLock().lock();
        long now = System.currentTimeMillis();
        long tokenDuration = (now - this.lastRefresh);
        needsRefresh = (tokenDuration >= this.expires - REFRESH_EPSILON);
        this.refreshLock.readLock().unlock();

        return needsRefresh;
    }
613431
public boolean isCheckpointingEnabled() {

		if (snapshotSettings == null) {
			return false;
		}

		long checkpointInterval = snapshotSettings.getCheckpointCoordinatorConfiguration().getCheckpointInterval();
		return checkpointInterval > 0 &&
			checkpointInterval < Long.MAX_VALUE;
	}
606250
public synchronized boolean reloadConfigsIfNecessary() {
    long time = RaidNode.now();
    if (time > lastReloadAttempt + reloadInterval) {
      lastReloadAttempt = time;
      try {
        File file = new File(configFileName);
        long lastModified = file.lastModified();
        if (lastModified > lastSuccessfulReload &&
            time > lastModified + RELOAD_WAIT) {
          reloadConfigs();
          lastSuccessfulReload = time;
          lastReloadAttemptFailed = false;
          return true;
        }
      } catch (Exception e) {
        if (!lastReloadAttemptFailed) {
          LOG.error("Failed to reload config file - " +
              "will use existing configuration.", e);
        }
        lastReloadAttemptFailed = true;
      }
    }
    return false;
  }