|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractSet<E>
java.util.TreeSet<String>
de.fesenmeyer.dbnormalizer.core.AttributeStringSet
public class AttributeStringSet
A Set
implementation for handling a set of attribute names. The set is ordered (by the
string which represents the attribute name) to allow fast comparison of two instances with the
compareTo(AttributeStringSet)
and equals(Object)
methods.
Constructor Summary | |
---|---|
AttributeStringSet()
Class constructor for creating an empty instance. |
|
AttributeStringSet(AttributeStringSet attrStrSet)
Class constructor for creating an instance by copying the AttributeStringSet given by the attrStrSet argument. |
|
AttributeStringSet(Collection<String> attrStrs)
Class constructor for creating an instance by copying the collection given by the attrStrs argument. |
Method Summary | |
---|---|
int |
compareTo(AttributeStringSet attrStrSet)
Compares this instance to another instance by comparing all attribute names (represented by strings) of the two instances. |
AttributeStringSet |
copy()
Copies this instance. |
boolean |
equals(Object o)
Compares this instance with the object specified by the o argument. |
int |
hashCode()
Returns the hashCode for this instance, which is computed based on the attribute names. |
Methods inherited from class java.util.TreeSet |
---|
add, addAll, ceiling, clear, clone, comparator, contains, descendingIterator, descendingSet, first, floor, headSet, headSet, higher, isEmpty, iterator, last, lower, pollFirst, pollLast, remove, size, subSet, subSet, tailSet, tailSet |
Methods inherited from class java.util.AbstractSet |
---|
removeAll |
Methods inherited from class java.util.AbstractCollection |
---|
containsAll, retainAll, toArray, toArray, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Set |
---|
containsAll, removeAll, retainAll, toArray, toArray |
Constructor Detail |
---|
public AttributeStringSet(AttributeStringSet attrStrSet)
attrStrSet
- the AttributeStringSet to be used to create a new instancepublic AttributeStringSet(Collection<String> attrStrs)
attrStrs
- the collection to be used to create a new instancepublic AttributeStringSet()
Method Detail |
---|
public int compareTo(AttributeStringSet attrStrSet)
AttributeStringSet
instances based on the alphabetical order of the attribute names
contained in the instances. For example, {A}
is smaller than
{A,B}
, and {A,B}
is smaller than {A,C}
.
compareTo
in interface Comparable<AttributeStringSet>
attrStrSet
- the instance to be compared with this instance
0
, if the attribute names in both instances are the same.
Returns an integer smaller than or greater than 0
if the attribute
names in both instances are not the same.public boolean equals(Object o)
equals
in interface Collection<String>
equals
in interface Set<String>
equals
in class AbstractSet<String>
o
- the object to compare this instance to.
AttributeStringSet
, null and
the compareTo(AttributeStringSet)
method returns a value different from
0
; true, if the compareTo(AttributeStringSet)
method returns
0
public int hashCode()
hashCode
in interface Collection<String>
hashCode
in interface Set<String>
hashCode
in class AbstractSet<String>
public AttributeStringSet copy()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |