// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.jdisc.application; import com.google.common.collect.ImmutableList; import java.net.URI; import java.util.Collection; import java.util.Collections; import java.util.Comparator; import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.Map; /** *
This is an immutable set of ordered bindings from {@link UriPattern}s to some target type T. To create an instance * of this class, you must 1) create a {@link BindingRepository}, 2) configure it using the {@link * BindingRepository#bind(String, Object)} method, and finally 3) call {@link BindingRepository#activate()}.
* * @author Simon Thoresen */ public class BindingSetResolves the binding that best matches (see commentary on {@link BindingRepository#bind(String, Object)}) the * given {@link URI}, and returns a {@link BindingMatch} object that describes the match and contains the * matched target. If there is no binding that matches the given URI, this method returns null.
* * @param uri The URI to match against the bindings in this set. * @return A {@link BindingMatch} object describing the match found, or null if not found. */ public BindingMatchResolves the binding that best matches (see commentary on {@link BindingRepository#bind(String, Object)}) the * given {@link URI}, and returns that target. If there is no binding that matches the given URI, this method * returns null.
* *Apart from a null-guard, this is equal to return match(uri).target()
.