Record Class SemVerRangeNode

java.lang.Object
java.lang.Record
xyz.rk0cc.josev.SemVerRangeNode
All Implemented Interfaces:
Serializable

public record SemVerRangeNode(@Nonnull SemVer semVer, char operator, boolean orEquals) extends Record implements Serializable
A node for SemVerRange to define preference of the range of SemVer.
Since:
1.0.0
See Also:
  • Constructor Details

    • SemVerRangeNode

      public SemVerRangeNode(@Nonnull SemVer semVer, char operator, boolean orEquals)
      Create new node to define a range of SemVer to be constrained.
      Parameters:
      semVer - A SemVer that uses to be constrained.
      operator - An operator that uses to express the range which are '>' or '<'.
      orEquals - Allowing same SemVer is justified or not.
  • Method Details

    • equals

      public boolean equals(Object o)
      Determine current configuration of SemVerRangeNode is the same or not.
      Specified by:
      equals in class Record
      Parameters:
      o - Compare object.
      Returns:
      true if the o is exact same with this node.
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in class Record
    • toString

      @Nonnull public String toString()
      Generate node object data under String.
      Specified by:
      toString in class Record
      Returns:
      A String of SemVerRangeNode data.
    • semVer

      @Nonnull public SemVer semVer()
      Returns the value of the semVer record component.
      Returns:
      the value of the semVer record component
    • operator

      public char operator()
      Returns the value of the operator record component.
      Returns:
      the value of the operator record component
    • orEquals

      public boolean orEquals()
      Returns the value of the orEquals record component.
      Returns:
      the value of the orEquals record component