Record Class MekSummaryComparator

java.lang.Object
java.lang.Record
megamek.common.comparators.MekSummaryComparator
All Implemented Interfaces:
Comparator<MekSummary>

@Deprecated(since="0.51.0", forRemoval=true) public record MekSummaryComparator(int m_nType) extends Record implements Comparator<MekSummary>
Deprecated, for removal: This API element is subject to removal in a future version.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    MekSummaryComparator(int m_nType)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Creates an instance of a MekSummaryComparator record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    final boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    Indicates whether some other object is "equal to" this one.
    final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns a hash code value for this object.
    int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns the value of the m_nType record component.
    final String
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • T_CHASSIS

      public static final int T_CHASSIS
      Deprecated, for removal: This API element is subject to removal in a future version.
      See Also:
    • T_MODEL

      public static final int T_MODEL
      Deprecated, for removal: This API element is subject to removal in a future version.
      See Also:
    • T_WEIGHT

      public static final int T_WEIGHT
      Deprecated, for removal: This API element is subject to removal in a future version.
      See Also:
    • T_BV

      public static final int T_BV
      Deprecated, for removal: This API element is subject to removal in a future version.
      See Also:
    • T_YEAR

      public static final int T_YEAR
      Deprecated, for removal: This API element is subject to removal in a future version.
      See Also:
    • T_COST

      public static final int T_COST
      Deprecated, for removal: This API element is subject to removal in a future version.
      See Also:
    • T_LEVEL

      public static final int T_LEVEL
      Deprecated, for removal: This API element is subject to removal in a future version.
      See Also:
  • Constructor Details

    • MekSummaryComparator

      public MekSummaryComparator(int m_nType)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates an instance of a MekSummaryComparator record class.
      Parameters:
      m_nType - the value for the m_nType record component
  • Method Details

    • compare

      public int compare(MekSummary ms1, MekSummary ms2)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      compare in interface Comparator<MekSummary>
    • toString

      public final String toString()
      Deprecated, for removal: This API element is subject to removal in a future version.
      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
    • hashCode

      public final int hashCode()
      Deprecated, for removal: This API element is subject to removal in a future version.
      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
    • equals

      public final boolean equals(Object o)
      Deprecated, for removal: This API element is subject to removal in a future version.
      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 '=='.
      Specified by:
      equals in interface Comparator<MekSummary>
      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.
    • m_nType

      public int m_nType()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the value of the m_nType record component.
      Returns:
      the value of the m_nType record component