Skip to content

Commit

Permalink
Merge pull request #394 from katarinaking/834
Browse files Browse the repository at this point in the history
MNEMONIC-834: Sort Order Enum
  • Loading branch information
katarinaking committed Jun 17, 2024
2 parents df90df6 + c272a40 commit 7b984f9
Showing 1 changed file with 24 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,35 @@
*/
package org.apache.mnemonic.query.memory;

/**
* Enum representing different sort orders that can be applied to a query.
*/
public enum SortOrder {

NONE(1),
ASCENDING(2),
DESCENDING(3);
// Enum constants representing the sort order types
NONE(1), // No sorting
ASCENDING(2), // Ascending order sorting
DESCENDING(3); // Descending order sorting

private int value;
// Private field to store the integer value associated with each sort order
private int value;

SortOrder(int val) {
this.value = val;
/**
* Constructor to initialize the enum constant with a specific integer value.
*
* @param val The integer value representing the sort order.
*/
SortOrder(int val) {
this.value = val;
}

public int getValue() {
return value;
/**
* Getter method to retrieve the integer value associated with the sort order.
*
* @return The integer value representing the sort order.
*/
public int getValue() {
return value;
}

}

0 comments on commit 7b984f9

Please sign in to comment.