Top Description Constructors Methods
com.badlogic.gdx.jnigen

public Class AntPathMatcher

extends Object
Class Inheritance
Imports
java.util.ArrayList, .List, .StringTokenizer

PathMatcher implementation for Ant-style path patterns. Examples are provided below.

Part of this mapping code has been kindly borrowed from Apache Ant.

The mapping matches URLs using the following rules:

Some examples:

Authors
Alef Arendsen, Juergen Hoeller
Since
16.07.2003

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
public boolean
match(String file, String[] patterns)

public boolean
match(String pattern, String str)

private boolean

Returns:

true if the string matches against the pattern, or false otherwise.
matchStrings
(String
pattern to match against. Must not be null.
pattern
,
String
string which must be matched against the pattern. Must not be null.
str
)

Tests whether or not a string matches against a pattern.

public static String[]
tokenizeToStringArray(String str, String delimiters, boolean trimTokens, boolean ignoreEmptyTokens)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

AntPathMatcherback to summary
public AntPathMatcher()

Method Detail

isPatternback to summary
public boolean isPattern(String str)
matchback to summary
public boolean match(String file, String[] patterns)
matchback to summary
public boolean match(String pattern, String str)
matchStringsback to summary
private boolean matchStrings(String pattern, String str)

Tests whether or not a string matches against a pattern. The pattern may contain two special characters:
'*' means zero or more characters
'?' means one and only one character

Parameters
pattern:String

pattern to match against. Must not be null.

str:String

string which must be matched against the pattern. Must not be null.

Returns:boolean

true if the string matches against the pattern, or false otherwise.

tokenizeToStringArrayback to summary
public static String[] tokenizeToStringArray(String str, String delimiters, boolean trimTokens, boolean ignoreEmptyTokens)