drm.util
Class StringCollections

java.lang.Object
  |
  +--drm.util.StringCollections

public abstract class StringCollections
extends java.lang.Object

Implements algorithms applicable for collections that contain Strings.


Constructor Summary
StringCollections()
           
 
Method Summary
static boolean containsPrefix(java.util.Collection c, java.lang.String pref)
          Returns true if the given collection contains a string with a given prefix.
static java.util.Collection prefix(java.util.Collection c, java.lang.String pref)
          Returns a new collection with the elements of c that have pref as prefix.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringCollections

public StringCollections()
Method Detail

prefix

public static java.util.Collection prefix(java.util.Collection c,
                                          java.lang.String pref)
Returns a new collection with the elements of c that have pref as prefix.

containsPrefix

public static boolean containsPrefix(java.util.Collection c,
                                     java.lang.String pref)
Returns true if the given collection contains a string with a given prefix.