Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (322)
Collections:
Other Resources:
maven-artifact-3.8.6.jar - Maven Artifact Module
maven-artifact-3.8.6.jar is the JAR file for Apache Maven 3.8.6 Artifact module.
Apache Maven is a software project management and comprehension tool.
JAR File Size and Download Location:
File: 58076 06-06-2022 16:16 lib/maven-artifact-3.8.6.jar Download: Apache Maven Website
✍: FYIcenter.com
⏎ org/apache/maven/artifact/versioning/Restriction.java
package org.apache.maven.artifact.versioning;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
/**
* Describes a restriction in versioning.
*
* @author <a href="mailto:brett@apache.org">Brett Porter</a>
*/
public class Restriction
{
private final ArtifactVersion lowerBound;
private final boolean lowerBoundInclusive;
private final ArtifactVersion upperBound;
private final boolean upperBoundInclusive;
public static final Restriction EVERYTHING = new Restriction( null, false, null, false );
public Restriction( ArtifactVersion lowerBound, boolean lowerBoundInclusive, ArtifactVersion upperBound,
boolean upperBoundInclusive )
{
this.lowerBound = lowerBound;
this.lowerBoundInclusive = lowerBoundInclusive;
this.upperBound = upperBound;
this.upperBoundInclusive = upperBoundInclusive;
}
public ArtifactVersion getLowerBound()
{
return lowerBound;
}
public boolean isLowerBoundInclusive()
{
return lowerBoundInclusive;
}
public ArtifactVersion getUpperBound()
{
return upperBound;
}
public boolean isUpperBoundInclusive()
{
return upperBoundInclusive;
}
public boolean containsVersion( ArtifactVersion version )
{
if ( lowerBound != null )
{
int comparison = lowerBound.compareTo( version );
if ( ( comparison == 0 ) && !lowerBoundInclusive )
{
return false;
}
if ( comparison > 0 )
{
return false;
}
}
if ( upperBound != null )
{
int comparison = upperBound.compareTo( version );
if ( ( comparison == 0 ) && !upperBoundInclusive )
{
return false;
}
if ( comparison < 0 )
{
return false;
}
}
return true;
}
@Override
public int hashCode()
{
int result = 13;
if ( lowerBound == null )
{
result += 1;
}
else
{
result += lowerBound.hashCode();
}
result *= lowerBoundInclusive ? 1 : 2;
if ( upperBound == null )
{
result -= 3;
}
else
{
result -= upperBound.hashCode();
}
result *= upperBoundInclusive ? 2 : 3;
return result;
}
@Override
public boolean equals( Object other )
{
if ( this == other )
{
return true;
}
if ( !( other instanceof Restriction ) )
{
return false;
}
Restriction restriction = (Restriction) other;
if ( lowerBound != null )
{
if ( !lowerBound.equals( restriction.lowerBound ) )
{
return false;
}
}
else if ( restriction.lowerBound != null )
{
return false;
}
if ( lowerBoundInclusive != restriction.lowerBoundInclusive )
{
return false;
}
if ( upperBound != null )
{
if ( !upperBound.equals( restriction.upperBound ) )
{
return false;
}
}
else if ( restriction.upperBound != null )
{
return false;
}
return upperBoundInclusive == restriction.upperBoundInclusive;
}
public String toString()
{
StringBuilder buf = new StringBuilder();
buf.append( isLowerBoundInclusive() ? '[' : '(' );
if ( getLowerBound() != null )
{
buf.append( getLowerBound().toString() );
}
buf.append( ',' );
if ( getUpperBound() != null )
{
buf.append( getUpperBound().toString() );
}
buf.append( isUpperBoundInclusive() ? ']' : ')' );
return buf.toString();
}
}
⏎ org/apache/maven/artifact/versioning/Restriction.java
Or download all of them as a single archive file:
File name: maven-artifact-3.8.6-src.zip File size: 47529 bytes Release date: 2022-06-06 Download
⇒ maven-builder-support-3.8.6.jar - Builder Support Module
⇐ maven-core-3.8.6.jar - Maven Core Module
2023-07-17, ∼7694🔥, 5💬
Popular Posts:
What is the jaxp\SourceValidator.jav aprovided in the Apache Xerces package? I have Apache Xerces 2....
Apache Log4j Core Implementation provides the functional components of the logging system. Users are...
What Is poi-ooxml-3.5.jar? poi-ooxml-3.5.jar is one of the JAR files for Apache POI 3.5, which provi...
What Is ojdbc8.jar for Oracle 12c R2? ojdbc8.jar for Oracle 12c R2 is the JAR files of ojdbc.jar, JD...
ANTLR is a powerful parser generator for multiple programming languages including Java. ANTLR contai...