public String toString() { if ( ANY_VERSION.equals( this ) ) { return makeString( openFloor, Version.emptyVersion, INFINITE_VERSION, openCeiling ); } return makeString( openFloor, floor, ceiling, openCeiling ); }
public Feature(String name, String version) { this.name = name; this.version = VersionCleaner.clean(version); }
public static Version getVersion(String version) { return getVersion( version, true ); }
private static VersionRange exactVersion(String versionRange) { return new VersionRange(versionRange, true, true); }
/** * atLeast constructor * * @param atLeast Minimum version * @param exact Exact range */ public VersionRange( Version atLeast, boolean exact ) { this.openFloor = false; this.floor = atLeast; this.ceiling = exact ? atLeast : INFINITE_VERSION; this.openCeiling = exact ? false : true; checkRange(); }
private void checkRange() { if (!isRangeValid(openFloor, floor, ceiling, openCeiling)) { throw new IllegalArgumentException("invalid version range: " + makeString(openFloor, floor, ceiling, openCeiling)); } }
public static Version getVersion(String version) { return getVersion( version, true ); }
public String toString() { if ( ANY_VERSION.equals( this ) ) { return makeString( openFloor, Version.emptyVersion, INFINITE_VERSION, openCeiling ); } return makeString( openFloor, floor, ceiling, openCeiling ); }
/** * atLeast constructor * * @param atLeast */ public VersionRange( Version atLeast, boolean exact ) { this.openFloor = false; this.floor = atLeast; this.ceiling = exact ? atLeast : INFINITE_VERSION; this.openCeiling = exact ? false : true; checkRange(); }
public static Version getVersion(String version) { return getVersion( version, true ); }
public String toString() { if ( ANY_VERSION.equals( this ) ) { return makeString( openFloor, Version.emptyVersion, INFINITE_VERSION, openCeiling ); } return makeString( openFloor, floor, ceiling, openCeiling ); }
/** * atLeast constructor * * @param atLeast Minimum version * @param exact Exact range */ public VersionRange( Version atLeast, boolean exact ) { this.openFloor = false; this.floor = atLeast; this.ceiling = exact ? atLeast : INFINITE_VERSION; this.openCeiling = exact ? false : true; checkRange(); }
public static Version getVersion(String version) { return getVersion( version, true ); }
public String toString() { if ( ANY_VERSION.equals( this ) ) { return makeString( openFloor, Version.emptyVersion, INFINITE_VERSION, openCeiling ); } return makeString( openFloor, floor, ceiling, openCeiling ); }
/** * atLeast constructor * * @param atLeast Minimum version * @param exact Exact range */ public VersionRange( Version atLeast, boolean exact ) { this.openFloor = false; this.floor = atLeast; this.ceiling = exact ? atLeast : INFINITE_VERSION; this.openCeiling = exact ? false : true; checkRange(); }
public static boolean inRange(String versionText, String range) { VersionRange versionRange = VersionRange.parseVersionRange(range); Version version = VersionTable.getVersion(versionText); if (version != null && versionRange != null) { return versionRange.matches(version); } return false; }
/** * Interval constructor * * @param openFloor Whether the lower bound of the range is inclusive (false) or exclusive (true). * @param floor The lower bound version of the range. * @param ceiling The upper bound version of the range. * @param openCeiling Whether the upper bound of the range is inclusive (false) or exclusive (true). */ public VersionRange( boolean openFloor, Version floor, Version ceiling, boolean openCeiling ) { this.openFloor = openFloor; this.floor = floor; this.ceiling = ceiling; this.openCeiling = openCeiling; checkRange(); }
/** * Interval constructor * * @param openFloor Whether the lower bound of the range is inclusive (false) or exclusive (true). * @param floor The lower bound version of the range. * @param ceiling The upper bound version of the range. * @param openCeiling Whether the upper bound of the range is inclusive (false) or exclusive (true). */ public VersionRange( boolean openFloor, Version floor, Version ceiling, boolean openCeiling ) { this.openFloor = openFloor; this.floor = floor; this.ceiling = ceiling; this.openCeiling = openCeiling; checkRange(); }
/** * Interval constructor * * @param openFloor Whether the lower bound of the range is inclusive (false) or exclusive (true). * @param floor The lower bound version of the range. * @param ceiling The upper bound version of the range. * @param openCeiling Whether the upper bound of the range is inclusive (false) or exclusive (true). */ public VersionRange( boolean openFloor, Version floor, Version ceiling, boolean openCeiling ) { this.openFloor = openFloor; this.floor = floor; this.ceiling = ceiling; this.openCeiling = openCeiling; checkRange(); }
/** * Interval constructor * * @param openFloor Whether the lower bound of the range is inclusive (false) or exclusive (true). * @param floor The lower bound version of the range. * @param ceiling The upper bound version of the range. * @param openCeiling Whether the upper bound of the range is inclusive (false) or exclusive (true). */ public VersionRange( boolean openFloor, Version floor, Version ceiling, boolean openCeiling ) { this.openFloor = openFloor; this.floor = floor; this.ceiling = ceiling; this.openCeiling = openCeiling; checkRange(); }