Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MNEMONIC-834: Sort Order Enum #394

Merged
merged 1 commit into from
Jun 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
}

}

Loading