All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.twitter.finatra.http.internal.routing.RouteParamMap.scala Maven / Gradle / Ivy

package com.twitter.finatra.http.internal.routing

import com.twitter.finagle.http.ParamMap

private[http] class RouteParamMap(
  paramMap: => ParamMap, //avoid constructing paramMap from Finagle request unless needed
  params: Map[String, String])
    extends ParamMap {

  override def isValid: Boolean = paramMap.isValid

  override def get(name: String): Option[String] = {
    params.get(name) orElse paramMap.get(name)
  }

  override def getAll(name: String): Iterable[String] = {
    params.get(name).toIterable ++ paramMap.getAll(name)
  }

  override def iterator: Iterator[(String, String)] = {
    params.iterator ++ paramMap.iterator
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy