Package net.smoofyuniverse.ore.project
Class OreVersion
java.lang.Object
net.smoofyuniverse.ore.project.OreVersion
A version of a project on Ore.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal InstantThe creation instant.The dependencies.final StringThe name of the version.final OreProjectThe project. -
Constructor Summary
ConstructorsConstructorDescriptionOreVersion(OreProject project, String name, Instant createdAt, Map<String, String> dependencies) Creates a version object. -
Method Summary
Modifier and TypeMethodDescriptionstatic Optional<OreVersion>getLatest(OreVersion[] versions, Predicate<OreVersion> predicate) Gets the latest version matching the predicate.getPage()Gets the URL of the version page.
-
Field Details
-
project
The project. -
name
The name of the version. -
createdAt
The creation instant. -
dependencies
The dependencies. Key: plugin id. Value: version, may be null.
-
-
Constructor Details
-
Method Details
-
getPage
Gets the URL of the version page.- Returns:
- The URL as a string.
-
getLatest
public static Optional<OreVersion> getLatest(OreVersion[] versions, Predicate<OreVersion> predicate) Gets the latest version matching the predicate.- Parameters:
versions- The versions to search in.predicate- The predicate.- Returns:
- The latest version matching the predicate.
-