org.tinygroup.weblayer.util
类 TinyPathMatcher

java.lang.Object
  继承者 org.tinygroup.weblayer.util.TinyPathMatcher

public class TinyPathMatcher
extends Object

功能说明:

系统版本: v1.0
开发人员: renhui
开发时间: 2013-5-15
功能描述: 写明作用,调用方式,使用场景,以及特殊情况


构造方法摘要
TinyPathMatcher()
           
 
方法摘要
 String combine(String pattern1, String pattern2)
          Combines two patterns into a new pattern that is returned.
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

TinyPathMatcher

public TinyPathMatcher()
方法详细信息

combine

public String combine(String pattern1,
                      String pattern2)
Combines two patterns into a new pattern that is returned.

This implementation simply concatenates the two patterns, unless the first pattern contains a file extension match (such as *.html. In that case, the second pattern should be included in the first, or an IllegalArgumentException is thrown.

For example:

Pattern 1Pattern 2Result
/hotelsnull/hotels
null/hotels/hotels
/hotels/bookings/hotels/bookings
/hotelsbookings/hotels/bookings
/hotels/*/bookings/hotels/bookings
/hotels/**/bookings/hotels/**/bookings
/hotels{hotel}/hotels/{hotel}
/hotels/*{hotel}/hotels/{hotel}
/hotels/**{hotel}/hotels/**/{hotel}
/*.html/hotels.html/hotels.html
/*.html/hotels/hotels.html
/*.html/*.txtIllegalArgumentException

参数:
pattern1 - the first pattern
pattern2 - the second pattern
返回:
the combination of the two patterns
抛出:
IllegalArgumentException - when the two patterns cannot be combined


Copyright © 2006–2013 开源组织. All rights reserved.