This will check if the current instance version is <code>&lt;</code> the
given version.

@param version The version to compare with.
@return true or false.
558045
public boolean isLessThan(String version) {
        JenkinsVersion create = create(version);
        return this.cv.compareTo(create.cv) < 0;
    }
545073
@VisibleForTesting
  static boolean isGreaterThanOrEqualTo(Version first, Version second) {
    if ((first.getMajor() > second.getMajor())
        || (first.getMajor() == second.getMajor() && first.getMinor() >= second.getMinor())) {
      return true;
    }
    return false;
  }
813638
public boolean validateVersionType(String versionType, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return true;
	}
148822
public boolean isCompatibleWith(String runtimeVersion) {
    if (null == this.minimalSqVersion) {
      // no constraint defined on the plugin
      return true;
    }

    Version effectiveMin = Version.create(minimalSqVersion.getName()).removeQualifier();
    Version effectiveVersion = Version.create(runtimeVersion).removeQualifier();

    if (runtimeVersion.endsWith("-SNAPSHOT")) {
      // check only the major and minor versions (two first fields)
      effectiveMin = Version.create(effectiveMin.getMajor() + "." + effectiveMin.getMinor());
    }

    return effectiveVersion.compareTo(effectiveMin) >= 0;
  }
1318087
public boolean isModifiedOnVersion(String version) {
		if (version == null || version.isEmpty()) {
			return true;
		}
		for (ModificationRecord record : this.modificationRecordList) {
			if (record.isModifiedOnVersion(version)) {
				return true;
			}
		}
		return false;
	}
139100
public boolean isGreaterOrEqual(String version) {
        JenkinsVersion create = create(version);
        return this.cv.compareTo(create.cv) >= 0;
    }
1014317
public function isVersion($phpVersion)
	{
		$compare = version_compare($this->getVersion(), $phpVersion);
		return ($compare === 1 || $compare === 0) ? true : false;
	}
1166873
private boolean versionCheck(String title) {
        if (this.type != UpdateType.NO_VERSION_CHECK) {
            final String version = caller.getPluginVersion();
            final String remoteVersion = title; // Get the newest file's version number

            if (this.hasTag(version) || version.contains(remoteVersion)) {
                // We already have the latest version, or this build is tagged for no-update
                this.result = Updater.UpdateResult.NO_UPDATE;
                return false;
            }
        }
        return true;
    }
628244
public static Version parseMavenVersion(String version) {
		if (Strings.isNullOrEmpty(version)) {
			return new Version(0, 0, 0);
		}

		// Detect the snapshot
		final boolean isSnapshot;
		final String coreVersion;
		Matcher matcher = Artifact.VERSION_FILE_PATTERN.matcher(version);
		if (matcher.matches()) {
			coreVersion = matcher.group(1);
			isSnapshot = true;
		} else {
			matcher = SNAPSHOT_VERSION_PATTERN.matcher(version);
			if (matcher.matches()) {
				coreVersion = matcher.group(1);
				isSnapshot = true;
			} else {
				coreVersion = version;
				isSnapshot = false;
			}
		}

		// Parse the numbers
		final String[] parts = coreVersion.split("[.]"); //$NON-NLS-1$
		final int[] numbers = new int[] {0, 0, 0};
		int i = 0;
		while (i < numbers.length && i < parts.length) {
			try {
				numbers[i] = Integer.parseInt(parts[i]);
				++i;
			} catch (Exception exception) {
				// Force the exit of the loop since a number cannot be find.
				i = numbers.length;
			}
		}
		// Reply
		if (isSnapshot) {
			return new Version(numbers[0], numbers[1], numbers[2], SNAPSHOT_QUALIFIER);
		}
		return new Version(numbers[0], numbers[1], numbers[2]);
	}
354797
def _in_version(self, *versions):
        ""
        for version in versions:
            if (self._version == version
                or (isinstance(self._version, collections.Container) 
                    and version in self._version)):
                return True
        return False
17587
@Override
  public boolean contains(IVersion version)
  {
    // This will match both SemanticVersion and FlexibleSemanticVersion
    if (version instanceof SemanticVersion) {
      return expression.interpret(((SemanticVersion) version).getVersionImpl());
    }
    throw new IllegalArgumentException("Semantic ranges expect semantic versions");
  }
171039
public boolean contains( VersionID m )
    {
        for ( Object _versionId : _versionIds )
        {
            VersionID vi = (VersionID) _versionId;
            boolean check = vi.match( m );
            if ( check )
            {
                return true;
            }
        }
        return false;
    }
1101110
public static boolean isAtLeastMajorMinor(String version, int majorVersion, int minorVersion) {
        SemanticVersion semanticVersion = new SemanticVersion(version);
        return isAtLeastMajorMinorImpl(semanticVersion, majorVersion, minorVersion);
    }
341011
public void setVersion(int version)
    {
        if (version < 0 || 255 < version)
        {
            throw new IllegalArgumentException("'version' is out of the valid range: " + version);
        }

        mVersion = version;

        getData()[VERSION_INDEX] = (byte)(version & 0xFF);
    }
669204
static boolean hasUpdate(final String newer, final String older) {
		return VERSION_PATTERN.matcher(newer).matches() && VERSION_PATTERN.matcher(older).matches() ? newer.compareTo(older) > 0 : false;
	}
451551
public function isPartOf(Version $version)
    {
        if (is_null($version->getOperator()))
        {
            if ($this->major == $version->getMajor()  && $this->minor == $version->getMinor() && $this->path == $version->getPath())
                return true;
            return false;
        }

        switch ($version->getOperator())
        {
            case self::GREATER:
                return $this->mustGreaterThan($version);
                break;

            case self::GREATER_EQUAL:
                return $this->mustGreaterEqualThan($version);
                break;
            case self::TILDE:
                return $this->mustTilde($version);
                break;
        }
    }
562138
public boolean isNewerThan(VersionComparator comparator) {
        if (this.major > comparator.getMajor()) {
            return true;
        }  else if (this.major == comparator.getMajor() && this.minor > comparator.getMinor()) {
            return true;
        } else if (this.major == comparator.getMajor() && this.minor == comparator.getMinor() && this.revision > comparator.getRevision()) {
            return true;
        } else if (this.major == comparator.getMajor() && this.minor == comparator.getMinor() && this.revision == comparator.getRevision() && this.prereleaseNumber > comparator.getPrereleaseNumber()) {
            return true;
        }
        return false;
    }