Interface PrefixSet

All Superinterfaces:
Collection<String>, Iterable<String>, Set<String>
All Known Implementing Classes:
PrefixSetImpl

public interface PrefixSet extends Set<String>
  • Method Details

    • getPrefixesOf

      Set<String> getPrefixesOf(String str, boolean inclusive)
      Return the set of prefixes of str
      Parameters:
      str -
      inclusive - True if str should be matched as well
      Returns:
    • intersect

      boolean intersect(PrefixSet other)
      (1) Replace shorter (more generic) prefixes in this with longer (more specific) ones in other when the former is a prefix of the latter. (2) Replace prefixes in this with shorter ones from other when the latter is a prefix for the former.
      Parameters:
      other -
      Returns:
      True when the operation modified this.