Class MavenVersionRangeParser.DeweyDecimal

java.lang.Object
org.apache.ivy.plugins.parser.m2.MavenVersionRangeParser.DeweyDecimal
Enclosing class:
MavenVersionRangeParser

private static final class MavenVersionRangeParser.DeweyDecimal extends Object
  • Field Details

    • components

      private final int[] components
      Array of components that make up DeweyDecimal
  • Constructor Details

    • DeweyDecimal

      public DeweyDecimal(int[] components)
      Construct a DeweyDecimal from an array of integer components.
      Parameters:
      components - an array of integer components.
    • DeweyDecimal

      public DeweyDecimal(String string) throws NumberFormatException
      Construct a DeweyDecimal from string in DeweyDecimal format.
      Parameters:
      string - the string in dewey decimal format
      Throws:
      NumberFormatException - if string is malformed
  • Method Details

    • getSize

      public int getSize()
      Return number of components in DeweyDecimal.
      Returns:
      the number of components in dewey decimal
    • get

      public int get(int index)
      Return the component at specified index.
      Parameters:
      index - the index of components
      Returns:
      the value of component at index
    • isEqual

      public boolean isEqual(MavenVersionRangeParser.DeweyDecimal other)
      Return true if this DeweyDecimal is equal to the other DeweyDecimal.
      Parameters:
      other - the other DeweyDecimal
      Returns:
      true if equal to other DeweyDecimal, false otherwise
    • isLessThan

      public boolean isLessThan(MavenVersionRangeParser.DeweyDecimal other)
      Return true if this DeweyDecimal is less than the other DeweyDecimal.
      Parameters:
      other - the other DeweyDecimal
      Returns:
      true if less than other DeweyDecimal, false otherwise
    • isLessThanOrEqual

      public boolean isLessThanOrEqual(MavenVersionRangeParser.DeweyDecimal other)
      Return true if this DeweyDecimal is less than or equal to the other DeweyDecimal.
      Parameters:
      other - the other DeweyDecimal
      Returns:
      true if less than or equal to other DeweyDecimal, false otherwise
    • isGreaterThan

      public boolean isGreaterThan(MavenVersionRangeParser.DeweyDecimal other)
      Return true if this DeweyDecimal is greater than the other DeweyDecimal.
      Parameters:
      other - the other DeweyDecimal
      Returns:
      true if greater than other DeweyDecimal, false otherwise
    • isGreaterThanOrEqual

      public boolean isGreaterThanOrEqual(MavenVersionRangeParser.DeweyDecimal other)
      Return true if this DeweyDecimal is greater than or equal to the other DeweyDecimal.
      Parameters:
      other - the other DeweyDecimal
      Returns:
      true if greater than or equal to other DeweyDecimal, false otherwise
    • toString

      public String toString()
      Return string representation of DeweyDecimal.
      Overrides:
      toString in class Object
      Returns:
      the string representation of DeweyDecimal.
    • compareTo

      public int compareTo(MavenVersionRangeParser.DeweyDecimal other)
      Compares this DeweyDecimal with another one.
      Parameters:
      other - another DeweyDecimal to compare with
      Returns:
      result
      See Also:
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object