Remove getSet() and getSortedSet() - use decorated()
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/branches/collections_jdk5_branch@471186 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
21c47cc136
commit
f38f7bfd62
|
@ -53,16 +53,6 @@ public abstract class AbstractSetDecorator<E>
|
||||||
super(set);
|
super(set);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the set being decorated.
|
|
||||||
*
|
|
||||||
* @return the decorated set
|
|
||||||
* @deprecated use decorated()
|
|
||||||
*/
|
|
||||||
protected Set<E> getSet() {
|
|
||||||
return decorated();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the set being decorated.
|
* Gets the set being decorated.
|
||||||
*
|
*
|
||||||
|
|
|
@ -53,16 +53,6 @@ public abstract class AbstractSortedSetDecorator<E>
|
||||||
super(set);
|
super(set);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the sorted set being decorated.
|
|
||||||
*
|
|
||||||
* @return the decorated set
|
|
||||||
* @deprecated use decorated()
|
|
||||||
*/
|
|
||||||
protected SortedSet<E> getSortedSet() {
|
|
||||||
return decorated();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the set being decorated.
|
* Gets the set being decorated.
|
||||||
*
|
*
|
||||||
|
|
|
@ -123,17 +123,17 @@ public final class UnmodifiableSortedSet
|
||||||
|
|
||||||
//-----------------------------------------------------------------------
|
//-----------------------------------------------------------------------
|
||||||
public SortedSet subSet(Object fromElement, Object toElement) {
|
public SortedSet subSet(Object fromElement, Object toElement) {
|
||||||
SortedSet sub = getSortedSet().subSet(fromElement, toElement);
|
SortedSet sub = decorated().subSet(fromElement, toElement);
|
||||||
return new UnmodifiableSortedSet(sub);
|
return new UnmodifiableSortedSet(sub);
|
||||||
}
|
}
|
||||||
|
|
||||||
public SortedSet headSet(Object toElement) {
|
public SortedSet headSet(Object toElement) {
|
||||||
SortedSet sub = getSortedSet().headSet(toElement);
|
SortedSet sub = decorated().headSet(toElement);
|
||||||
return new UnmodifiableSortedSet(sub);
|
return new UnmodifiableSortedSet(sub);
|
||||||
}
|
}
|
||||||
|
|
||||||
public SortedSet tailSet(Object fromElement) {
|
public SortedSet tailSet(Object fromElement) {
|
||||||
SortedSet sub = getSortedSet().tailSet(fromElement);
|
SortedSet sub = decorated().tailSet(fromElement);
|
||||||
return new UnmodifiableSortedSet(sub);
|
return new UnmodifiableSortedSet(sub);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -174,7 +174,7 @@ public class TestListOrderedSet extends AbstractTestSet {
|
||||||
assertEquals(1, set.size());
|
assertEquals(1, set.size());
|
||||||
set.add(b); // will match but not replace A as equal
|
set.add(b); // will match but not replace A as equal
|
||||||
assertEquals(1, set.size());
|
assertEquals(1, set.size());
|
||||||
assertSame(a, set.getSet().iterator().next());
|
assertSame(a, set.decorated().iterator().next());
|
||||||
assertSame(a, set.iterator().next());
|
assertSame(a, set.iterator().next());
|
||||||
assertSame(a, set.get(0));
|
assertSame(a, set.get(0));
|
||||||
assertSame(a, set.asList().get(0));
|
assertSame(a, set.asList().get(0));
|
||||||
|
|
Loading…
Reference in New Issue