Record Class DependencyData

java.lang.Object
java.lang.Record
io.github.slimjar.resolver.data.DependencyData

public record DependencyData(@NotNull Collection<Mirror> mirrors, @NotNull Collection<Repository> repositories, @NotNull Collection<Dependency> dependencies, @NotNull Collection<RelocationRule> relocations) extends Record
  • Constructor Details

    • DependencyData

      @Contract(pure=true) public DependencyData(@NotNull @NotNull Collection<Mirror> mirrors, @NotNull @NotNull Collection<Repository> repositories, @NotNull @NotNull Collection<Dependency> dependencies, @NotNull @NotNull Collection<RelocationRule> relocations)
      Creates an instance of a DependencyData record class.
      Parameters:
      mirrors - the value for the mirrors record component
      repositories - the value for the repositories record component
      dependencies - the value for the dependencies record component
      relocations - the value for the relocations record component
  • Method Details

    • read

      @NotNull @Contract(pure=true) public static @NotNull DependencyData read(@NotNull @NotNull DataInput in) throws IOException
      Throws:
      IOException
    • write

      public void write(@NotNull @NotNull DataOutput out) throws IOException
      Throws:
      IOException
    • equals

      @Contract(value="null -> false", pure=true) public boolean equals(@Nullable @Nullable Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • hashCode

      @Contract(pure=true) public int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • toString

      @Contract(pure=true) @NotNull public @NotNull String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • mirrors

      @NotNull public @NotNull Collection<Mirror> mirrors()
      Returns the value of the mirrors record component.
      Returns:
      the value of the mirrors record component
    • repositories

      @NotNull public @NotNull Collection<Repository> repositories()
      Returns the value of the repositories record component.
      Returns:
      the value of the repositories record component
    • dependencies

      @NotNull public @NotNull Collection<Dependency> dependencies()
      Returns the value of the dependencies record component.
      Returns:
      the value of the dependencies record component
    • relocations

      @NotNull public @NotNull Collection<RelocationRule> relocations()
      Returns the value of the relocations record component.
      Returns:
      the value of the relocations record component