From 8d48789ea5315443988bb8a09d04531caa08ef09 Mon Sep 17 00:00:00 2001 From: Gary Gregory Date: Tue, 17 Oct 2023 09:08:06 -0400 Subject: [PATCH] No _ in private variable name --- .../set/AbstractSortedSetTest.java | 60 +++++++++---------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/src/test/java/org/apache/commons/collections4/set/AbstractSortedSetTest.java b/src/test/java/org/apache/commons/collections4/set/AbstractSortedSetTest.java index ed6dc4373..c36e29322 100644 --- a/src/test/java/org/apache/commons/collections4/set/AbstractSortedSetTest.java +++ b/src/test/java/org/apache/commons/collections4/set/AbstractSortedSetTest.java @@ -185,37 +185,37 @@ public abstract class AbstractSortedSetTest extends AbstractSetTest { public class TestSortedSetSubSet extends AbstractSortedSetTest { - private final int m_Type; - private int m_LowBound; - private int m_HighBound; - private final E[] m_FullElements; - private final E[] m_OtherElements; + private final int type; + private int lowBound; + private int highBound; + private final E[] fullElements; + private final E[] otherElements; @SuppressWarnings("unchecked") public TestSortedSetSubSet(final int bound, final boolean head) { super("TestSortedSetSubSet"); if (head) { //System.out.println("HEADSET"); - m_Type = TYPE_HEADSET; - m_HighBound = bound; - m_FullElements = (E[]) new Object[bound]; - System.arraycopy(AbstractSortedSetTest.this.getFullElements(), 0, m_FullElements, 0, bound); - m_OtherElements = (E[]) new Object[bound - 1]; + this.type = TYPE_HEADSET; + this.highBound = bound; + this.fullElements = (E[]) new Object[bound]; + System.arraycopy(AbstractSortedSetTest.this.getFullElements(), 0, fullElements, 0, bound); + this.otherElements = (E[]) new Object[bound - 1]; System.arraycopy(//src src_pos dst dst_pos length - AbstractSortedSetTest.this.getOtherElements(), 0, m_OtherElements, 0, bound - 1); + AbstractSortedSetTest.this.getOtherElements(), 0, otherElements, 0, bound - 1); //System.out.println(new TreeSet(Arrays.asList(m_FullElements))); //System.out.println(new TreeSet(Arrays.asList(m_OtherElements))); } else { //System.out.println("TAILSET"); - m_Type = TYPE_TAILSET; - m_LowBound = bound; + this.type = TYPE_TAILSET; + this.lowBound = bound; final Object[] allElements = AbstractSortedSetTest.this.getFullElements(); //System.out.println("bound = "+bound +"::length="+allElements.length); - m_FullElements = (E[]) new Object[allElements.length - bound]; - System.arraycopy(allElements, bound, m_FullElements, 0, allElements.length - bound); - m_OtherElements = (E[]) new Object[allElements.length - bound - 1]; + this.fullElements = (E[]) new Object[allElements.length - bound]; + System.arraycopy(allElements, bound, fullElements, 0, allElements.length - bound); + this.otherElements = (E[]) new Object[allElements.length - bound - 1]; System.arraycopy(//src src_pos dst dst_pos length - AbstractSortedSetTest.this.getOtherElements(), bound, m_OtherElements, 0, allElements.length - bound - 1); + AbstractSortedSetTest.this.getOtherElements(), bound, otherElements, 0, allElements.length - bound - 1); //System.out.println(new TreeSet(Arrays.asList(m_FullElements))); //System.out.println(new TreeSet(Arrays.asList(m_OtherElements))); //resetFull(); @@ -230,16 +230,16 @@ public abstract class AbstractSortedSetTest extends AbstractSetTest { public TestSortedSetSubSet(final int loBound, final int hiBound) { super("TestSortedSetSubSet"); //System.out.println("SUBSET"); - m_Type = TYPE_SUBSET; - m_LowBound = loBound; - m_HighBound = hiBound; + this.type = TYPE_SUBSET; + this.lowBound = loBound; + this.highBound = hiBound; final int length = hiBound - loBound; //System.out.println("Low=" + loBound + "::High=" + hiBound + "::Length=" + length); - m_FullElements = (E[]) new Object[length]; - System.arraycopy(AbstractSortedSetTest.this.getFullElements(), loBound, m_FullElements, 0, length); - m_OtherElements = (E[]) new Object[length - 1]; + this.fullElements = (E[]) new Object[length]; + System.arraycopy(AbstractSortedSetTest.this.getFullElements(), loBound, fullElements, 0, length); + this.otherElements = (E[]) new Object[length - 1]; System.arraycopy(//src src_pos dst dst_pos length - AbstractSortedSetTest.this.getOtherElements(), loBound, m_OtherElements, 0, length - 1); + AbstractSortedSetTest.this.getOtherElements(), loBound, otherElements, 0, length - 1); //System.out.println(new TreeSet(Arrays.asList(m_FullElements))); //System.out.println(new TreeSet(Arrays.asList(m_OtherElements))); @@ -265,22 +265,22 @@ public abstract class AbstractSortedSetTest extends AbstractSetTest { @Override public E[] getFullElements() { - return m_FullElements; + return fullElements; } @Override public E[] getOtherElements() { - return m_OtherElements; + return otherElements; } private SortedSet getSubSet(final SortedSet set) { final E[] elements = AbstractSortedSetTest.this.getFullElements(); - switch (m_Type) { + switch (type) { case TYPE_SUBSET : - return set.subSet(elements[m_LowBound], elements[m_HighBound]); + return set.subSet(elements[lowBound], elements[highBound]); case TYPE_HEADSET : - return set.headSet(elements[m_HighBound]); + return set.headSet(elements[highBound]); case TYPE_TAILSET : - return set.tailSet(elements[m_LowBound]); + return set.tailSet(elements[lowBound]); default : return null; }