de.unihalle.informatik.MiToBo.tools.strings
Class StringAnalysis
java.lang.Object
de.unihalle.informatik.MiToBo.tools.strings.StringAnalysis
public class StringAnalysis
- extends Object
Class providing helpers to analyze (sets of) strings.
- Author:
- moeller
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StringAnalysis
public StringAnalysis()
getLongestCommonPrefixes
public static Vector<String> getLongestCommonPrefixes(Vector<String> vec)
- Extracts the set of all prefixes shared by at least two strings in the
given set.
- Parameters:
vec
- Set of strings to be analyzed.
- Returns:
- Set of common prefixes.
findPrefixes
protected static Vector<String> findPrefixes(Vector<String> vec)
- Helper to recursively extract common prefixes.
- Parameters:
vec
- Set of strings to analyze.
- Returns:
- Set of common prefixes.
Copyright © 2010–2015 Martin Luther University Halle-Wittenberg. All rights reserved.