Record Class BalancedMergeSort.FileTrack
java.lang.Object
java.lang.Record
AEDs3.DataBase.BalancedMergeSort.FileTrack
- Record Components:
track- O registro de Track a ser armazenado.origin- O índice do arquivo de origem onde a Track está localizada.
- All Implemented Interfaces:
Comparable<BalancedMergeSort.FileTrack>
- Enclosing class:
BalancedMergeSort
private static record BalancedMergeSort.FileTrack(Track track, int origin)
extends Record
implements Comparable<BalancedMergeSort.FileTrack>
Classe auxiliar que agrupa uma Track com o índice do arquivo em que está,
para uso com o PriorityQueue.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintCompara duas instâncias de FileTrack com base no registro de Track.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intorigin()Returns the value of theoriginrecord component.final StringtoString()Returns a string representation of this record class.track()Returns the value of thetrackrecord component.
-
Field Details
-
track
-
origin
private final int originThe field for theoriginrecord component.
-
-
Constructor Details
-
FileTrack
-
-
Method Details
-
compareTo
Compara duas instâncias de FileTrack com base no registro de Track.- Specified by:
compareToin interfaceComparable<BalancedMergeSort.FileTrack>- Parameters:
other- O outro objeto FileTrack a ser comparado.- Returns:
- O valor da comparação entre os dois objetos.
-
toString
-
hashCode
-
equals
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
track
-
origin
-