public class NameComparator
extends java.lang.Object
implements java.util.Comparator<java.lang.String>
DatabaseDescriptor.areNamesEqual(String,String,String,boolean)
Constructor and Description |
---|
NameComparator(DatabaseDescriptor desc,
boolean external)
Creates a new Comparator for comparing database object names.
|
Modifier and Type | Method and Description |
---|---|
int |
compare(java.lang.String o1,
java.lang.String o2) |
static java.util.Set<java.lang.String> |
createNameSet(DatabaseDescriptor desc,
boolean external)
Create a new, empty, set that will use the given descriptor to compare
the names added.
|
public NameComparator(DatabaseDescriptor desc, boolean external)
desc
- the descriptor for the database the names are for.external
- whether the names are external or internal.public int compare(java.lang.String o1, java.lang.String o2)
compare
in interface java.util.Comparator<java.lang.String>
public static java.util.Set<java.lang.String> createNameSet(DatabaseDescriptor desc, boolean external)
desc
- the descriptor whose case policy will be used to govern
the contains logic for the setexternal
- whether the names being added will be external names,
or internal.