Class YMLUtil

java.lang.Object
com.illumon.iris.db.v2.routing.impl.yaml.YMLUtil

public class YMLUtil
extends Object
Functions to help DataRoutingServiceYmlImpl parse yml files.
  • Constructor Details

  • Method Details

    • getOptionalString

      @Nullable public static String getOptionalString​(@NotNull Map<?,​Object> yml, @NotNull String tag, @NotNull String context)
      Convenience: cast the value of key to a String, or throw a DataRoutingConfigurationException.
      Parameters:
      yml - a yml map
      tag - the key to get
      context - string for context in the possible exception
      Returns:
      a (possibly null) String value for the tag
    • getOptionalBoolean

      @Nullable public static Boolean getOptionalBoolean​(@NotNull Map<?,​Object> yml, @NotNull String tag, @NotNull String context)
      Convenience: cast the value of key to a Boolean, or throw a DataRoutingConfigurationException.
      Parameters:
      yml - a yml map
      tag - the key to get
      context - optional string for context in the possible exception
      Returns:
      a (possibly null) Boolean value for the tag