Skip to content

Commit c8df0ae

Browse files
committed
refactor: remove OrderType
1 parent 3c7174c commit c8df0ae

File tree

3 files changed

+4
-44
lines changed

3 files changed

+4
-44
lines changed

src/main/kotlin/spp/protocol/artifact/OrderType.kt

Lines changed: 0 additions & 27 deletions
This file was deleted.

src/main/kotlin/spp/protocol/artifact/log/LogOrderType.kt

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,13 @@
1616
*/
1717
package spp.protocol.artifact.log
1818

19-
import spp.protocol.artifact.OrderType
20-
2119
/**
22-
* todo: description.
20+
* Represents a known order type for sorting logs.
2321
*
2422
* @since 0.2.0
2523
* @author [Brandon Fergerson](mailto:bfergerson@apache.org)
2624
*/
27-
enum class LogOrderType : OrderType {
25+
enum class LogOrderType {
2826
NEWEST_LOGS,
2927
OLDEST_LOGS;
30-
31-
//todo: not need to replace _LOGS?
32-
val id = name.replace("_LOGS", "").toLowerCase()
33-
override val description = id.toLowerCase().capitalize()
3428
}

src/main/kotlin/spp/protocol/artifact/trace/TraceOrderType.kt

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,14 @@
1616
*/
1717
package spp.protocol.artifact.trace
1818

19-
import spp.protocol.artifact.OrderType
20-
2119
/**
22-
* todo: description.
20+
* Represents a known order type for sorting traces.
2321
*
2422
* @since 0.1.0
2523
* @author [Brandon Fergerson](mailto:bfergerson@apache.org)
2624
*/
27-
enum class TraceOrderType : OrderType {
25+
enum class TraceOrderType {
2826
LATEST_TRACES,
2927
SLOWEST_TRACES,
3028
FAILED_TRACES;
31-
32-
//todo: not need to replace _TRACES?
33-
val id = name.replace("_TRACES", "").toLowerCase()
34-
override val description = id.toLowerCase().capitalize()
35-
val fullDescription = name.toLowerCase().split("_").joinToString(" ") { it.capitalize() }
3629
}

0 commit comments

Comments
 (0)