com.mucommander.ui.autocomplete.completers.services
Class PrefixFilter

java.lang.Object
  extended by com.mucommander.ui.autocomplete.completers.services.PrefixFilter

public class PrefixFilter
extends java.lang.Object

A PrefixFilter matches strings that start with certain prefix.

Author:
Arik Hadas

Method Summary
 boolean accept(java.lang.String input)
           
static PrefixFilter createPrefixFilter(java.lang.String prefix)
           
 java.util.Vector filter(java.lang.String[] strings)
          Convenient method that filters out strings that do not start with this filter's prefix.
 java.util.Vector filter(java.util.Vector strings)
          Convenient method that filters out strings that do not start with this filter's prefix.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createPrefixFilter

public static PrefixFilter createPrefixFilter(java.lang.String prefix)
Parameters:
prefix - - The prefix that each string should start with in order to pass this filter.
Returns:
A filter of the given prefix.

accept

public boolean accept(java.lang.String input)
Parameters:
input - - Some string.
Returns:
true if the given input was accepted by this filter, false otherwise.

filter

public java.util.Vector filter(java.lang.String[] strings)
Convenient method that filters out strings that do not start with this filter's prefix.

Parameters:
strings - - Array of strings.
Returns:
Vector of strings which start with this filter's prefix.

filter

public java.util.Vector filter(java.util.Vector strings)
Convenient method that filters out strings that do not start with this filter's prefix.

Parameters:
strings - - Vector of strings.
Returns:
Vector of strings which start with this filter's prefix.


This file is part of muCommander - Copyright (C) 2002-2008 Maxence Bernard