com.microsoft.tfs.core.clients.versioncontrol.path
Class Wildcard

java.lang.Object
  extended by com.microsoft.tfs.core.clients.versioncontrol.path.Wildcard

public final class Wildcard
extends java.lang.Object

Static methods to match strings against TFS path wildcard characters.

Since:
TEE-SDK-10.1
Thread-safety:
thread-safe

Constructor Summary
Wildcard()
           
 
Method Summary
static boolean isWildcard(char ch)
          Tests whether the given character is a wildcard character
static boolean isWildcard(java.lang.String string)
          Tests whether the given string contains wildcards.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Wildcard

public Wildcard()
Method Detail

isWildcard

public static boolean isWildcard(java.lang.String string)
Tests whether the given string contains wildcards. This method does not consider whether the given string is a server or local path, and will return true if any wildcard character is found inside it. For paths, usually only the last component should be considered when testing for wildcards (because of TFS wildcard rules). Use ServerPath.isWildcard(String) or LocalPath.isWildcard(String) methods instead of this one for that purpose.

Parameters:
string - the string to test (if string is null, return value is false)
Returns:
true if the string contains wildcard characters, false if it does not or the given string was null

isWildcard

public static boolean isWildcard(char ch)
Tests whether the given character is a wildcard character

Parameters:
ch - the character to test
Returns:
true if the given character is a wildcard, false if it is not


© 2015 Microsoft. All rights reserved.