|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.rice.cs.drjava.ui.predictive.PredictiveInputModel.PrefixStrategy<X>
public static class PredictiveInputModel.PrefixStrategy<X extends Comparable<? super X>>
Matching based on string prefix.
| Constructor Summary | |
|---|---|
PredictiveInputModel.PrefixStrategy()
|
|
| Method Summary | |
|---|---|
int |
compare(X item1,
X item2,
PredictiveInputModel<X> pim)
Compare the two items and return -1, 0, or 1 if item1 is less than, equal to, or greater than item2. |
boolean |
equivalent(X item1,
X item2,
PredictiveInputModel<X> pim)
Returns true if the two items are equivalent under this matching strategy. |
String |
force(X item,
String mask)
Force the mask to fit this entry. |
String |
getExtendedSharedMask(List<X> items,
PredictiveInputModel<X> pim)
Returns the mask extended by the shared extension. |
X |
getLongestMatch(X item,
List<X> items,
PredictiveInputModel<X> pim)
Returns the item from the list that is the longest match. |
String |
getSharedMaskExtension(List<X> items,
PredictiveInputModel<X> pim)
Returns the shared mask extension for the list of items. |
boolean |
isMatch(X item,
PredictiveInputModel<X> pim)
Returns true if the item is a match. |
boolean |
isPerfectMatch(X item,
PredictiveInputModel<X> pim)
Returns true if the item is perfect a match. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PredictiveInputModel.PrefixStrategy()
| Method Detail |
|---|
public String toString()
toString in class Object
public boolean isMatch(X item,
PredictiveInputModel<X> pim)
PredictiveInputModel.MatchingStrategy
isMatch in interface PredictiveInputModel.MatchingStrategy<X extends Comparable<? super X>>item - item to checkpim - predictive input model
public boolean isPerfectMatch(X item,
PredictiveInputModel<X> pim)
PredictiveInputModel.MatchingStrategy
isPerfectMatch in interface PredictiveInputModel.MatchingStrategy<X extends Comparable<? super X>>item - item to checkpim - predictive input model
public boolean equivalent(X item1,
X item2,
PredictiveInputModel<X> pim)
PredictiveInputModel.MatchingStrategy
equivalent in interface PredictiveInputModel.MatchingStrategy<X extends Comparable<? super X>>item1 - first itemitem2 - second itempim - predictive input model
public int compare(X item1,
X item2,
PredictiveInputModel<X> pim)
PredictiveInputModel.MatchingStrategy
compare in interface PredictiveInputModel.MatchingStrategy<X extends Comparable<? super X>>item1 - first itemitem2 - second itempim - predictive input model
public X getLongestMatch(X item,
List<X> items,
PredictiveInputModel<X> pim)
PredictiveInputModel.MatchingStrategy
getLongestMatch in interface PredictiveInputModel.MatchingStrategy<X extends Comparable<? super X>>item - target itemitems - list with itemspim - predictive input model
public String getSharedMaskExtension(List<X> items,
PredictiveInputModel<X> pim)
PredictiveInputModel.MatchingStrategy
getSharedMaskExtension in interface PredictiveInputModel.MatchingStrategy<X extends Comparable<? super X>>items - items for which the mask extension should be generatedpim - predictive input model
public String getExtendedSharedMask(List<X> items,
PredictiveInputModel<X> pim)
PredictiveInputModel.MatchingStrategy
getExtendedSharedMask in interface PredictiveInputModel.MatchingStrategy<X extends Comparable<? super X>>items - items for which the mask extension should be generatedpim - predictive input model
public String force(X item,
String mask)
PredictiveInputModel.MatchingStrategy
force in interface PredictiveInputModel.MatchingStrategy<X extends Comparable<? super X>>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||