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 VersionRange
ANY_VERSION
A 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 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
.static VersionRange
atLeast(DelimitedVersion version)
Creates a version range that will match any version at or above the specified version.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
.static VersionRange
atMost(DelimitedVersion version)
Creates a version range that will match any version at or below the specified version.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 asDelimitedVersion
instances.boolean
matches(String version)
Determines whether the specified version (parsed as anDelimitedVersion
falls within the version range.boolean
matches(DelimitedVersion version)
Determines whether the specified version falls within the version range.String
toString()
-
-
-
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 asDelimitedVersion
instances.
-
matches
public boolean matches(@NonNull String version)
Determines whether the specified version (parsed as anDelimitedVersion
falls within the version range.
-
matches
public boolean matches(@NonNull DelimitedVersion version)
Determines whether the specified version falls within the version range.
-
-