Java Code Examples for org.osgi.framework.VersionRange#LEFT_CLOSED

The following examples show how to use org.osgi.framework.VersionRange#LEFT_CLOSED . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FeatureInformation.java    From packagedrone with Eclipse Public License 1.0 5 votes vote down vote up
public VersionRange makeVersionRange ()
{
    if ( this.version == null )
    {
        return new VersionRange ( "0.0.0" );
    }
    else
    {
        return new VersionRange ( VersionRange.LEFT_CLOSED, this.version, this.version, VersionRange.RIGHT_CLOSED );
    }
}
 
Example 2
Source File: FeatureInformation.java    From packagedrone with Eclipse Public License 1.0 5 votes vote down vote up
public VersionRange makeVersionRange ()
{
    if ( this.version == null )
    {
        return new VersionRange ( "0.0.0" );
    }
    else
    {
        return new VersionRange ( VersionRange.LEFT_CLOSED, this.version, this.version, VersionRange.RIGHT_CLOSED );
    }
}
 
Example 3
Source File: FeatureInformation.java    From packagedrone with Eclipse Public License 1.0 4 votes vote down vote up
@Override
public VersionRange makeRange ( final Version version )
{
    final Version endVersion = new Version ( version.getMajor (), version.getMinor () + 1, 0 );
    return new VersionRange ( VersionRange.LEFT_CLOSED, version, endVersion, VersionRange.RIGHT_OPEN );
}
 
Example 4
Source File: FeatureInformation.java    From packagedrone with Eclipse Public License 1.0 4 votes vote down vote up
@Override
public VersionRange makeRange ( final Version version )
{
    final Version endVersion = new Version ( version.getMajor () + 1, 0, 0 );
    return new VersionRange ( VersionRange.LEFT_CLOSED, version, endVersion, VersionRange.RIGHT_OPEN );
}
 
Example 5
Source File: FeatureInformation.java    From packagedrone with Eclipse Public License 1.0 4 votes vote down vote up
@Override
public VersionRange makeRange ( final Version version )
{
    return new VersionRange ( VersionRange.LEFT_CLOSED, version, version, VersionRange.RIGHT_CLOSED );
}
 
Example 6
Source File: Osgis.java    From brooklyn-server with Apache License 2.0 4 votes vote down vote up
private boolean isVersionRange(String version) {
    return (version != null) && (version.length() > 2) 
            && (version.charAt(0) == VersionRange.LEFT_OPEN || version.charAt(0) == VersionRange.LEFT_CLOSED)
            && (version.charAt(version.length()-1) == VersionRange.RIGHT_OPEN || version.charAt(version.length()-1) == VersionRange.RIGHT_CLOSED);
}