Class NameUtil

java.lang.Object
com.palmergames.bukkit.towny.utils.NameUtil

public class NameUtil extends Object
A helper class to extract name data from classes and filter matching strings.
Author:
Suneet Tipirneni (Siris), stzups
  • Constructor Details

    • NameUtil

      public NameUtil()
  • Method Details

    • getNames

      public static <T extends Nameable> List<String> getNames(Collection<T> objs)
      A helper function that extracts names from objects.
      Type Parameters:
      T - The collection type that implements Nameable
      Parameters:
      objs - The Nameable objects to get the names from.
      Returns:
      A list of the names of the objects.
    • filterByStart

      public static List<String> filterByStart(List<String> list, String startingWith)
      Returns strings that start with a string
      Parameters:
      list - strings to check
      startingWith - string to check with list
      Returns:
      strings from list that start with startingWith
    • getTagFromName

      public static String getTagFromName(String name)