本文整理了Java中org.codehaus.modello.model.Version.equals()
方法的一些代码示例,展示了Version.equals()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Version.equals()
方法的具体详情如下:
包路径:org.codehaus.modello.model.Version
类名称:Version
方法名:equals
暂无
代码示例来源:origin: org.codehaus.modello/modello-core
public boolean equals( Object obj )
{
if ( !( obj instanceof VersionRange ) )
{
return false;
}
VersionRange other = (VersionRange) obj;
return fromVersion.equals( other.fromVersion ) && toVersion.equals( other.toVersion );
}
代码示例来源:origin: org.codehaus.modello/modello-core
public int compareTo( Version otherVersion )
{
if ( greaterThan( otherVersion ) )
{
return +1;
}
else if ( equals( otherVersion ) )
{
return 0;
}
else
{
return -1;
}
}
}
代码示例来源:origin: org.codehaus.modello/modello-core
public String toString()
{
if ( fromVersion.equals( toVersion ) )
{
return fromVersion.toString( "", "." );
}
else if ( toVersion.equals( Version.INFINITE ) )
{
return fromVersion.toString( "", "." ) + "+";
}
else
{
return "[" + fromVersion.toString( "", "." ) + " => " + toVersion.toString( "", "." ) + "]";
}
}
}
代码示例来源:origin: org.codehaus.modello/modello-core
public boolean inside( VersionRange range )
{
if ( range.getFromVersion().equals( this ) )
{
return true;
}
else if ( ( this.greaterThan( range.getFromVersion() ) ) && ( this.lesserThan( range.getToVersion() ) ) )
{
return true;
}
else if ( this.equals( range.getFromVersion() ) || this.equals( range.getToVersion() ) )
{
return true;
}
return false;
}
代码示例来源:origin: org.codehaus.modello/modello-core
public void validateElement()
throws ModelValidationException
{
// Check if superClass exists
if ( hasSuperClass() )
{
try
{
getModel().getClass( superClass, getVersionRange() );
isInternalSuperClass = true;
}
catch ( ModelloRuntimeException e )
{
isInternalSuperClass = false;
}
}
if ( getModel().getDefault( ModelDefault.CHECK_DEPRECATION ).getBoolean() )
{
if ( ! Version.INFINITE.equals( getVersionRange().getToVersion() )
&& getDeprecatedVersion() == null )
{
throw new ModelValidationException( "You must define the deprecated version of '" + getName() + "' class." );
}
}
}
代码示例来源:origin: org.codehaus.modello/modello-plugin-converters
if ( targetVersion.equals( sourceVersion ) )
if ( targetVersion.equals( v ) )
if ( sourceVersion.equals( v ) )
内容来源于网络,如有侵权,请联系作者删除!