File tree Expand file tree Collapse file tree
commons-math4-genetics/src/main/java/org/apache/commons/math4/genetics/chromosome Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ public int compareTo(final Chromosome<P> another) {
123123 * @param another chromosome to compare
124124 * @return true if <code>another</code> is equivalent to this chromosome
125125 */
126- protected boolean isSame (final AbstractChromosome <P > another ) {
126+ public boolean isSame (final AbstractChromosome <P > another ) {
127127 final P decodedChromosome = decode ();
128128 final P otherDecodedChromosome = another .decode ();
129129 return decodedChromosome .equals (otherDecodedChromosome );
@@ -141,22 +141,4 @@ public int hashCode() {
141141 return Objects .hash (decode ());
142142 }
143143
144- /** {@inheritDoc} */
145- @ SuppressWarnings ("unchecked" )
146- @ Override
147- public boolean equals (Object obj ) {
148- if (this == obj ) {
149- return true ;
150- }
151- if (obj == null ) {
152- return false ;
153- }
154- if (getClass () != obj .getClass ()) {
155- return false ;
156- }
157- final AbstractChromosome <P > other = (AbstractChromosome <P >) obj ;
158-
159- return isSame (other );
160- }
161-
162144}
You can’t perform that action at this time.
0 commit comments