Remove '_' from private names.
This commit is contained in:
parent
dc01c2583a
commit
af2e247545
|
@ -179,38 +179,38 @@ public abstract class AbstractNavigableSetTest<E> extends AbstractSortedSetTest<
|
||||||
|
|
||||||
public class TestNavigableSetSubSet extends AbstractNavigableSetTest<E> {
|
public class TestNavigableSetSubSet extends AbstractNavigableSetTest<E> {
|
||||||
|
|
||||||
private final int m_Type;
|
private final int type;
|
||||||
private int m_LowBound;
|
private int lowBound;
|
||||||
private int m_HighBound;
|
private int highBound;
|
||||||
private final E[] m_FullElements;
|
private final E[] fullElements;
|
||||||
private final E[] m_OtherElements;
|
private final E[] otherElements;
|
||||||
private final boolean m_Inclusive;
|
private final boolean m_Inclusive;
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public TestNavigableSetSubSet(final int bound, final boolean head, final boolean inclusive) {
|
public TestNavigableSetSubSet(final int bound, final boolean head, final boolean inclusive) {
|
||||||
super("TestNavigableSetSubSet");
|
super("TestNavigableSetSubSet");
|
||||||
if (head) {
|
if (head) {
|
||||||
m_Type = TYPE_HEADSET;
|
type = TYPE_HEADSET;
|
||||||
m_Inclusive = inclusive;
|
m_Inclusive = inclusive;
|
||||||
m_HighBound = bound;
|
highBound = bound;
|
||||||
|
|
||||||
final int realBound = inclusive ? bound + 1 : bound;
|
final int realBound = inclusive ? bound + 1 : bound;
|
||||||
m_FullElements = (E[]) new Object[realBound];
|
fullElements = (E[]) new Object[realBound];
|
||||||
System.arraycopy(AbstractNavigableSetTest.this.getFullElements(), 0, m_FullElements, 0, realBound);
|
System.arraycopy(AbstractNavigableSetTest.this.getFullElements(), 0, fullElements, 0, realBound);
|
||||||
m_OtherElements = (E[]) new Object[bound - 1];
|
otherElements = (E[]) new Object[bound - 1];
|
||||||
System.arraycopy(//src src_pos dst dst_pos length
|
System.arraycopy(//src src_pos dst dst_pos length
|
||||||
AbstractNavigableSetTest.this.getOtherElements(), 0, m_OtherElements, 0, bound - 1);
|
AbstractNavigableSetTest.this.getOtherElements(), 0, otherElements, 0, bound - 1);
|
||||||
} else {
|
} else {
|
||||||
m_Type = TYPE_TAILSET;
|
type = TYPE_TAILSET;
|
||||||
m_Inclusive = inclusive;
|
m_Inclusive = inclusive;
|
||||||
m_LowBound = bound;
|
lowBound = bound;
|
||||||
final Object[] allelements = AbstractNavigableSetTest.this.getFullElements();
|
final Object[] allelements = AbstractNavigableSetTest.this.getFullElements();
|
||||||
final int realBound = inclusive ? bound : bound + 1;
|
final int realBound = inclusive ? bound : bound + 1;
|
||||||
m_FullElements = (E[]) new Object[allelements.length - realBound];
|
fullElements = (E[]) new Object[allelements.length - realBound];
|
||||||
System.arraycopy(allelements, realBound, m_FullElements, 0, allelements.length - realBound);
|
System.arraycopy(allelements, realBound, fullElements, 0, allelements.length - realBound);
|
||||||
m_OtherElements = (E[]) new Object[allelements.length - bound - 1];
|
otherElements = (E[]) new Object[allelements.length - bound - 1];
|
||||||
System.arraycopy(//src src_pos dst dst_pos length
|
System.arraycopy(//src src_pos dst dst_pos length
|
||||||
AbstractNavigableSetTest.this.getOtherElements(), bound, m_OtherElements, 0, allelements.length - bound - 1);
|
AbstractNavigableSetTest.this.getOtherElements(), bound, otherElements, 0, allelements.length - bound - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
} //type
|
} //type
|
||||||
|
@ -218,19 +218,19 @@ public abstract class AbstractNavigableSetTest<E> extends AbstractSortedSetTest<
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public TestNavigableSetSubSet(final int lobound, final int hibound, final boolean inclusive) {
|
public TestNavigableSetSubSet(final int lobound, final int hibound, final boolean inclusive) {
|
||||||
super("TestNavigableSetSubSet");
|
super("TestNavigableSetSubSet");
|
||||||
m_Type = TYPE_SUBSET;
|
type = TYPE_SUBSET;
|
||||||
m_LowBound = lobound;
|
lowBound = lobound;
|
||||||
m_HighBound = hibound;
|
highBound = hibound;
|
||||||
m_Inclusive = inclusive;
|
m_Inclusive = inclusive;
|
||||||
|
|
||||||
final int fullLoBound = inclusive ? lobound : lobound + 1;
|
final int fullLoBound = inclusive ? lobound : lobound + 1;
|
||||||
final int length = hibound - lobound + 1 - (inclusive ? 0 : 2);
|
final int length = hibound - lobound + 1 - (inclusive ? 0 : 2);
|
||||||
m_FullElements = (E[]) new Object[length];
|
fullElements = (E[]) new Object[length];
|
||||||
System.arraycopy(AbstractNavigableSetTest.this.getFullElements(), fullLoBound, m_FullElements, 0, length);
|
System.arraycopy(AbstractNavigableSetTest.this.getFullElements(), fullLoBound, fullElements, 0, length);
|
||||||
final int otherLength = hibound - lobound;
|
final int otherLength = hibound - lobound;
|
||||||
m_OtherElements = (E[]) new Object[otherLength - 1];
|
otherElements = (E[]) new Object[otherLength - 1];
|
||||||
System.arraycopy(//src src_pos dst dst_pos length
|
System.arraycopy(//src src_pos dst dst_pos length
|
||||||
AbstractNavigableSetTest.this.getOtherElements(), lobound, m_OtherElements, 0, otherLength - 1);
|
AbstractNavigableSetTest.this.getOtherElements(), lobound, otherElements, 0, otherLength - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -252,22 +252,22 @@ public abstract class AbstractNavigableSetTest<E> extends AbstractSortedSetTest<
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public E[] getFullElements() {
|
public E[] getFullElements() {
|
||||||
return m_FullElements;
|
return fullElements;
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public E[] getOtherElements() {
|
public E[] getOtherElements() {
|
||||||
return m_OtherElements;
|
return otherElements;
|
||||||
}
|
}
|
||||||
|
|
||||||
private NavigableSet<E> getSubSet(final NavigableSet<E> set) {
|
private NavigableSet<E> getSubSet(final NavigableSet<E> set) {
|
||||||
final E[] elements = AbstractNavigableSetTest.this.getFullElements();
|
final E[] elements = AbstractNavigableSetTest.this.getFullElements();
|
||||||
switch (m_Type) {
|
switch (type) {
|
||||||
case TYPE_SUBSET :
|
case TYPE_SUBSET :
|
||||||
return set.subSet(elements[m_LowBound], m_Inclusive, elements[m_HighBound], m_Inclusive);
|
return set.subSet(elements[lowBound], m_Inclusive, elements[highBound], m_Inclusive);
|
||||||
case TYPE_HEADSET :
|
case TYPE_HEADSET :
|
||||||
return set.headSet(elements[m_HighBound], m_Inclusive);
|
return set.headSet(elements[highBound], m_Inclusive);
|
||||||
case TYPE_TAILSET :
|
case TYPE_TAILSET :
|
||||||
return set.tailSet(elements[m_LowBound], m_Inclusive);
|
return set.tailSet(elements[lowBound], m_Inclusive);
|
||||||
default :
|
default :
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue