-
public class CommandUtils
-
-
Method Summary
Modifier and Type Method Description static StringfindBestStringMatch(String id, Collection<String> toSearch)static Map.Entry<String, Collection<String>>findBestStringMatch(String id, Array<Collection<String>> sources)static Map.Entry<String, Double>findBestStringMatchWithSimularity(String id, Collection<String> toSearch)static StringbestMatch(List<Map.Entry<String, Float>> toSearch)static booleanisInteger(String arg)static booleanisLong(String arg)static booleanisFloat(String arg)static booleanisDouble(String arg)static Stringformat(int toFormat)static Stringformat(float toFormat)static Stringindent(String message, int indentation, String existingIndentation)Indents and word-wraps a String to fit within the console's overlay. static Stringindent(String message, int indentation)Indents and word-wraps a String to fit within the console's overlay. static FactionAPIfindBestFactionMatch(String name)static MarketAPIfindBestMarketMatch(String name)static MarketConditionSpecAPIfindBestMarketConditionMatch(String name)static IndustrySpecAPIfindBestIndustryMatch(String name)static LocationAPIfindBestLocationMatch(String name)static StarSystemAPIfindBestSystemMatch(String name)static SectorEntityTokenfindBestTokenMatch(String name, Collection<SectorEntityToken> toSearch)static OfficerDataAPIfindBestOfficerMatch(String name, CampaignFleetAPI fleet)static List<SectorEntityToken>getEntitiesWithTags(LocationAPI location, Array<String> tags)static SectorEntityTokenfindTokenInLocation(String toFind, LocationAPI location)static StringgetFactionName(FactionAPI faction)static CargoAPIgetUsableCargo(SectorEntityToken token)-
-
Method Detail
-
findBestStringMatch
static String findBestStringMatch(String id, Collection<String> toSearch)
-
findBestStringMatch
static Map.Entry<String, Collection<String>> findBestStringMatch(String id, Array<Collection<String>> sources)
-
findBestStringMatchWithSimularity
static Map.Entry<String, Double> findBestStringMatchWithSimularity(String id, Collection<String> toSearch)
-
indent
static String indent(String message, int indentation, String existingIndentation)
Indents and word-wraps a String to fit within the console's overlay.
- Parameters:
message- The String to be indented.indentation- The number of spaces to indent{@code message}with.existingIndentation- Any existing indentation, for complicated messages that are indented multiple times.
-
indent
static String indent(String message, int indentation)
Indents and word-wraps a String to fit within the console's overlay.
- Parameters:
message- The String to be indented.indentation- The number of spaces to indent{@code message}with.
-
findBestFactionMatch
@Nullable() static FactionAPI findBestFactionMatch(String name)
-
findBestMarketMatch
@Nullable() static MarketAPI findBestMarketMatch(String name)
-
findBestMarketConditionMatch
@Nullable() static MarketConditionSpecAPI findBestMarketConditionMatch(String name)
-
findBestIndustryMatch
@Nullable() static IndustrySpecAPI findBestIndustryMatch(String name)
-
findBestLocationMatch
static LocationAPI findBestLocationMatch(String name)
-
findBestSystemMatch
@Nullable() static StarSystemAPI findBestSystemMatch(String name)
-
findBestTokenMatch
@Nullable() static SectorEntityToken findBestTokenMatch(String name, Collection<SectorEntityToken> toSearch)
-
findBestOfficerMatch
@Nullable() static OfficerDataAPI findBestOfficerMatch(String name, CampaignFleetAPI fleet)
-
getEntitiesWithTags
static List<SectorEntityToken> getEntitiesWithTags(LocationAPI location, Array<String> tags)
-
findTokenInLocation
static SectorEntityToken findTokenInLocation(String toFind, LocationAPI location)
-
getFactionName
static String getFactionName(FactionAPI faction)
-
getUsableCargo
static CargoAPI getUsableCargo(SectorEntityToken token)
-
-
-
-