Skip to content

Commit

Permalink
list enum values
Browse files Browse the repository at this point in the history
  • Loading branch information
gmuth committed Dec 24, 2024
1 parent a822e94 commit c103531
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/main/kotlin/de/gmuth/ipp/iana/IppRegistrationsSection6.kt
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
package de.gmuth.ipp.iana

import java.util.logging.Logger.getLogger

/**
* Copyright (c) 2020-2023 Gerhard Muth
*/

// https://www.iana.org/assignments/ipp-registrations/ipp-registrations.xhtml#ipp-registrations-6
object IppRegistrationsSection6 {

private val logger = getLogger(javaClass.name)

data class EnumAttributeValue(
val attribute: String,
val value: String,
Expand Down Expand Up @@ -56,4 +60,10 @@ object IppRegistrationsSection6 {
getEnumAttributeValue(aliasMap[attribute] ?: attribute, value)?.name
} ?: value

fun listEnumValues(attribute: String) {
enumAttributeValuesMap.values
.filter { it.attribute == attribute }
.forEach { logger.info { it.toString() } }
}

}

0 comments on commit c103531

Please sign in to comment.