Package net.openid.appauth.browser
Class VersionRange
- java.lang.Object
-
- net.openid.appauth.browser.VersionRange
-
public class VersionRange extends Object
A browser filter which matches when a browser falls into a version range.Versions are expected to match the semantics of
DelimitedVersion.
-
-
Field Summary
Fields Modifier and Type Field Description static VersionRangeANY_VERSIONA version range that matches any delimited version.
-
Constructor Summary
Constructors Constructor Description VersionRange(DelimitedVersion lowerBound, DelimitedVersion upperBound)Creates a version range with the specified bounds.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VersionRangeatLeast(String version)Creates a version range that will match any version at or above the specified version, which will be parsed as aDelimitedVersion.static VersionRangeatLeast(DelimitedVersion version)Creates a version range that will match any version at or above the specified version.static VersionRangeatMost(String version)Creates a version range that will match any version at or below the specified version, which will be parsed as aDelimitedVersion.static VersionRangeatMost(DelimitedVersion version)Creates a version range that will match any version at or below the specified version.static VersionRangebetween(String lowerBound, String upperBound)Creates a version range that will match any version equal to or between the specified versions, which will be parsed asDelimitedVersioninstances.booleanmatches(String version)Determines whether the specified version (parsed as anDelimitedVersionfalls within the version range.booleanmatches(DelimitedVersion version)Determines whether the specified version falls within the version range.StringtoString()
-
-
-
Field Detail
-
ANY_VERSION
public static final VersionRange ANY_VERSION
A version range that matches any delimited version.
-
-
Constructor Detail
-
VersionRange
public VersionRange(@Nullable DelimitedVersion lowerBound, @Nullable DelimitedVersion upperBound)
Creates a version range with the specified bounds.A null bound is treated as “no bound” on that end.
-
-
Method Detail
-
atLeast
public static VersionRange atLeast(String version)
Creates a version range that will match any version at or above the specified version, which will be parsed as aDelimitedVersion.
-
atLeast
public static VersionRange atLeast(DelimitedVersion version)
Creates a version range that will match any version at or above the specified version.
-
atMost
public static VersionRange atMost(String version)
Creates a version range that will match any version at or below the specified version, which will be parsed as aDelimitedVersion.
-
atMost
public static VersionRange atMost(DelimitedVersion version)
Creates a version range that will match any version at or below the specified version.
-
between
public static VersionRange between(String lowerBound, String upperBound)
Creates a version range that will match any version equal to or between the specified versions, which will be parsed asDelimitedVersioninstances.
-
matches
public boolean matches(@NonNull String version)
Determines whether the specified version (parsed as anDelimitedVersionfalls within the version range.
-
matches
public boolean matches(@NonNull DelimitedVersion version)
Determines whether the specified version falls within the version range.
-
-