Verify.

@param version the version
@param time the time
@return true, if successful
519114
private boolean verify(String version, Long time) {
    if (versionToItem.containsKey(version)) {
      Path path = collectionCachePath.resolve(version);
      File file = path.toFile();
      if (file.exists() && file.canRead() && file.canWrite()) {
        if (time != null) {
          if (!file.setLastModified(time)) {
            log.debug("couldn't change filetime " + file.getAbsolutePath());
          } else {
            expirationVersion.put(version, time + (1000 * lifeTime));
          }
        }
        return true;
      } else {
        return false;
      }
    } else {
      return false;
    }
  }
242971
public function validTimeStr ( $time ) {
        if ($time === '0000-00-00 00:00:00') {
            return true;
        }

        if ($this->fitNonExistingDates && $this->isNonExistingTimeString( $time )) {
            $time = $this->getPossibleDateString( $time );
        }

        return (is_string( $time ) && strlen( $time ) == 19 && $time == date( 'Y-m-d H:i:s',
                                                                              strtotime( $time ) ));
    }
1225452
public static final ApiVersionAlreadyExistsException apiVersionAlreadyExistsException(String apiName, String version) {
        return new ApiVersionAlreadyExistsException(Messages.i18n.format("ApiVersionAlreadyExists", apiName, version)); //$NON-NLS-1$
    }
234279
@Override
  public boolean isModified()
  {
    long now = CurrentTime.currentTime();
    long lastCheckTime = _lastCheckTime.get();
    
    if (now <= lastCheckTime + _checkInterval) {
      return _isModified;
    }

    if (! _lastCheckTime.compareAndSet(lastCheckTime, now)) {
      return _isModified;
    }

    if (isModifiedImpl()) {
      _isModified = true;
      //_lastCheckTime.set(0);
    }
    else {
      _isModified = false;
    }

    return _isModified;
  }
254934
public static Version valueOf(final String value) {
        final Optional<Instant> time = parse(value);
        if (time.isPresent()) {
            return new Version(time.get());
        }
        return null;
    }
950931
public static boolean isValid(@Nullable final String hour) {
        if (hour == null) {
            return true;
        }
        return PATTERN.matcher(hour).matches();
    }
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;
	}
448817
public static boolean isUnixTimeStamp(String timeStamp) {
    if (timeStamp.length() != ComplianceConfigurationKeys.TIME_STAMP_LENGTH) {
      return false;
    }
    try {
      Long.parseLong(timeStamp);
      return true;
    } catch (NumberFormatException e) {
      return false;
    }
  }
61393
public static Version valueOf(final String value) {
        if (value != null) {
            final Instant time = parse(value);
            if (time != null) {
                return new Version(time);
            }
        }
        return null;
    }
227315
def match(self, version):
        
        if isinstance(version, string_types):
            version = self.version_class(version)
        for operator, constraint, prefix in self._parts:
            f = self._operators.get(operator)
            if isinstance(f, string_types):
                f = getattr(self, f)
            if not f:
                msg = ('%r not implemented '
                       'for %s' % (operator, self.__class__.__name__))
                raise NotImplementedError(msg)
            if not f(version, constraint, prefix):
                return False
        return True
813638
public boolean validateVersionType(String versionType, DiagnosticChain diagnostics, Map<Object, Object> context) {
		return true;
	}
410349
def matches?(time)

      time = Time.at(time) unless time.kind_of?(Time)

      time = @timezone.utc_to_local(time.getutc) if @timezone

      return false unless sub_match?(time, :sec, @seconds)
      return false unless sub_match?(time, :min, @minutes)
      return false unless sub_match?(time, :hour, @hours)
      return false unless date_match?(time)
      true
    end
730161
def verify_id_n_version(id, version):
    
    stmt = _get_sql('verify-id-and-version.sql')
    args = dict(id=id, version=version)

    with db_connect() as db_conn:
        with db_conn.cursor() as cursor:
            cursor.execute(stmt, args)
            try:
                valid = cursor.fetchone()[0]
            except TypeError:
                raise NotFound(join_ident_hash(id, version))
    return True
344225
public boolean match( Artifact artifact )
        throws InvalidVersionSpecificationException
    {
        for ( Pattern pattern : patterns )
        {
            if ( pattern.match( artifact ) )
            {
                for ( Pattern ignorePattern : ignorePatterns )
                {
                    if ( ignorePattern.match( artifact ) )
                    {
                        return false;
                    }
                }
                return true;
            }
        }
        return false;
    }
469439
@SuppressWarnings({"boxing"})
    public boolean checkOceeVersion(String version) {

        try {
            Class<?> manager = Class.forName("org.opencms.ocee.base.CmsOceeManager");
            Method checkVersion = manager.getMethod("checkOceeVersion", String.class);
            return (Boolean)checkVersion.invoke(manager, version);
        } catch (@SuppressWarnings("unused") ClassNotFoundException e) {
            return true;
        } catch (Exception e) {
            e.printStackTrace();
            return false;
        }
    }
112280
public boolean isLessOrEqual(String version) {
        JenkinsVersion create = create(version);
        return this.cv.compareTo(create.cv) <= 0;
    }
624580
public static boolean isToday(Date time) {
        String now = getFormatDate(SHORT);
        String target = getFormatDate(SHORT, time);
        return now.equals(target);
    }