code: @Override
    public boolean contains(IVersion version)
    {
  
      // Can the versions be compared?
      if (!(version instanceof SemanticVersion)) {
        return false;
      }
  
      // We always want the extended version on the left, since it has the
      // more complex code.
      if (this.version instanceof ExtendedSemanticVersion) {
        switch (operator) {
          case ">":
            return this.version.lessThan(version);
          case ">=":
            return this.version.lessThanOrEqualTo(version);
          case "<":
            return this.version.greaterThan(version);
          case "<=":
            return this.version.greaterThanOrEqualTo(version);
          default:
            throw new IllegalArgumentException("Invalid operator: " + operator);
        }
      }
      else {
        switch (operator) {
          case "<":
            return ((SemanticVersion) version).lessThan(this.version);
          case "<=":
            return ((SemanticVersion) version).lessThanOrEqualTo(this.version);
          case ">":
            return ((SemanticVersion) version).greaterThan(this.version);
          case ">=":
            return ((SemanticVersion) version).greaterThanOrEqualTo(this.version);
          default:
            throw new IllegalArgumentException("Invalid operator: " + operator);
        }
      }
    }
docs: /*
  (non-Javadoc)
  @see net.ossindex.version.IVersionRange#contains(net.ossindex.version.IVersion)