Code example for ImmutableMap

Methods: get

0
    Optional<Flavor> flavor = getFlavor(flavors);
    return flavor.transform(Functions.forMap(translation));
  } 
 
  public T getValue(Flavor flavor) throws FlavorDomainException {
    T result = translation.get(flavor);
    if (result == null) {
      throw new FlavorDomainException( 
          String.format(
              "\"%s\" has no flavor \"%s\"", 
              name,
              flavor));
    } 
    return result;
  } 
 
} 
Experience pair programming with AI  Get Codota for Java