Bukkit  1.7.9-R0.2-63-gcb87f4e
 All Classes Namespaces Files Functions Variables Enumerator Pages
org.bukkit.util.StringUtil Class Reference

Static Public Member Functions

static< TextendsCollection
<?superString > T 
copyPartialMatches (final String token, final Iterable< String > originals, final T collection) throws UnsupportedOperationException, IllegalArgumentException
 Copies all elements from the iterable collection of originals to the collection provided.
 
static boolean startsWithIgnoreCase (final String string, final String prefix) throws IllegalArgumentException, NullPointerException
 This method uses a region to check case-insensitive equality.
 

Detailed Description

Definition at line 6 of file StringUtil.java.

Member Function Documentation

static <TextendsCollection<?superString> T org.bukkit.util.StringUtil.copyPartialMatches ( final String  token,
final Iterable< String >  originals,
final T  collection 
) throws UnsupportedOperationException, IllegalArgumentException
static

Copies all elements from the iterable collection of originals to the collection provided.

Parameters
tokenString to search for
originalsAn iterable collection of strings to filter.
collectionThe collection to add matches to
Returns
the collection provided that would have the elements copied into
Exceptions
UnsupportedOperationExceptionif the collection is immutable and originals contains a string which starts with the specified search string.
IllegalArgumentExceptionif any parameter is is null
IllegalArgumentExceptionif originals contains a null element. Note: the collection may be modified before this is thrown

Definition at line 24 of file StringUtil.java.

References org.bukkit.util.StringUtil.startsWithIgnoreCase().

Referenced by org.bukkit.command.defaults.PardonIpCommand.tabComplete(), org.bukkit.command.defaults.DefaultGameModeCommand.tabComplete(), org.bukkit.command.defaults.WeatherCommand.tabComplete(), org.bukkit.command.defaults.BanListCommand.tabComplete(), org.bukkit.command.defaults.DifficultyCommand.tabComplete(), org.bukkit.command.defaults.GameRuleCommand.tabComplete(), org.bukkit.command.defaults.TimeCommand.tabComplete(), org.bukkit.command.defaults.GameModeCommand.tabComplete(), org.bukkit.command.defaults.WhitelistCommand.tabComplete(), org.bukkit.command.defaults.EffectCommand.tabComplete(), org.bukkit.command.defaults.TimingsCommand.tabComplete(), org.bukkit.command.defaults.EnchantCommand.tabComplete(), and org.bukkit.command.defaults.ScoreboardCommand.tabComplete().

static boolean org.bukkit.util.StringUtil.startsWithIgnoreCase ( final String  string,
final String  prefix 
) throws IllegalArgumentException, NullPointerException
static

This method uses a region to check case-insensitive equality.

This means the internal array does not need to be copied like a toLowerCase() call would.

Parameters
stringString to check
prefixPrefix of string to compare
Returns
true if provided string starts with, ignoring case, the prefix provided
Exceptions
NullPointerExceptionif prefix is null
IllegalArgumentExceptionif string is null

Definition at line 50 of file StringUtil.java.

Referenced by org.bukkit.util.StringUtil.copyPartialMatches(), org.bukkit.command.defaults.PardonCommand.tabComplete(), org.bukkit.command.defaults.OpCommand.tabComplete(), org.bukkit.command.defaults.DeopCommand.tabComplete(), org.bukkit.command.defaults.ClearCommand.tabComplete(), org.bukkit.command.Command.tabComplete(), org.bukkit.command.defaults.GiveCommand.tabComplete(), org.bukkit.command.defaults.WhitelistCommand.tabComplete(), org.bukkit.command.defaults.VersionCommand.tabComplete(), and org.bukkit.command.SimpleCommandMap.tabComplete().


The documentation for this class was generated from the following file: