List of usage examples for org.apache.commons.lang.builder CompareToBuilder CompareToBuilder
public CompareToBuilder()
Constructor for CompareToBuilder.
Starts off assuming that the objects are equal.
From source file:org.jgap.gp.function.TransferMemory.java
/** * The compareTo-method.//from ww w . j a va 2 s.c o m * * @param a_other the other object to compare * @return -1, 0, 1 * * @author Klaus Meffert * @since 3.0 */ public int compareTo(Object a_other) { int result = super.compareTo(a_other); if (result != 0) { return result; } TransferMemory other = (TransferMemory) a_other; return new CompareToBuilder().append(m_sourceStorageName, other.m_sourceStorageName) .append(m_targetStorageName, other.m_targetStorageName).toComparison(); }
From source file:org.jgap.gp.function.Tupel.java
/** * The compareTo-method.//from w ww.j a v a 2 s . c o m * * @param a_other the other object to compare * @return -1, 0, 1 * * @author Klaus Meffert * @since 3.4.3 */ public int compareTo(Object a_other) { int result = super.compareTo(a_other); if (result != 0) { return result; } Tupel other = (Tupel) a_other; return new CompareToBuilder().append(m_types, other.m_types).toComparison(); }
From source file:org.jgap.gp.function.WriteToMatrix.java
/** * The compareTo-method./* w w w .j a v a 2 s . com*/ * * @param a_other the other object to compare * @return -1, 0, 1 * * @author Klaus Meffert * @since 3.4.3 */ public int compareTo(Object a_other) { int result = super.compareTo(a_other); if (result != 0) { return result; } WriteToMatrix other = (WriteToMatrix) a_other; return new CompareToBuilder().append(m_matrixName, other.m_matrixName) .append(getSubChildTypes(), other.getSubChildTypes()).toComparison(); }
From source file:org.jgap.gp.impl.GPConfiguration.java
public int compareTo(Object a_other) { if (a_other == null) { return 1; } else {/* ww w .j a v a2s . c o m*/ GPConfiguration other = (GPConfiguration) a_other; return new CompareToBuilder().append(m_objectiveFunction, other.m_objectiveFunction) .append(m_crossoverProb, other.m_crossoverProb) .append(m_reproductionProb, other.m_reproductionProb) .append(m_newChromsPercent, other.m_newChromsPercent) .append(m_maxCrossoverDepth, other.m_maxCrossoverDepth) .append(m_maxInitDepth, other.m_maxInitDepth) .append(m_selectionMethod.getClass(), other.m_selectionMethod.getClass()) .append(m_crossMethod.getClass(), other.m_crossMethod.getClass()) .append(m_programCreationMaxTries, other.m_programCreationMaxTries) .append(m_strictProgramCreation, other.m_strictProgramCreation) .append(m_fitnessEvaluator.getClass(), other.m_fitnessEvaluator.getClass()).toComparison(); } }
From source file:org.jgap.impl.JGAPFactory.java
/** * @param a_other other object to compare * @return as always//w ww .jav a2 s .c o m * * @author Klaus Meffert * @since 3.2 */ public int compareTo(Object a_other) { if (a_other == null) { return 1; } else { // Do not consider m_parameters, m_cache and m_useCaching. // ------------------------------------------------------- JGAPFactory other = (JGAPFactory) a_other; return new CompareToBuilder().append(m_cloneHandlers.toArray(), other.m_cloneHandlers.toArray()) .append(m_initer.toArray(), other.m_initer.toArray()) .append(m_compareHandlers.toArray(), other.m_compareHandlers.toArray()) .append(m_defaultCloneHandler, other.m_defaultCloneHandler) .append(m_defaultComparer, other.m_defaultComparer) .append(m_geneticOpConstraint, other.m_geneticOpConstraint).toComparison(); } }
From source file:org.kuali.kfs.module.purap.util.VendorGroupingHelper.java
/** * @see java.lang.Comparable#compareTo(Object) *///from w ww . java 2 s .c o m public int compareTo(Object object) { VendorGroupingHelper myClass = (VendorGroupingHelper) object; return new CompareToBuilder().append(this.vendorPostalCode, myClass.vendorPostalCode) .append(this.vendorHeaderGeneratedIdentifier, myClass.vendorHeaderGeneratedIdentifier) .append(this.vendorDetailAssignedIdentifier, myClass.vendorDetailAssignedIdentifier) .append(this.vendorCountry, myClass.vendorCountry).toComparison(); }
From source file:org.kuali.kra.common.notification.lookup.keyvalue.KeyLabelSortByValue.java
@Override public int compareTo(KeyLabelPair o) { if (o == null) { throw new NullPointerException("the object to compare to is null"); }//from www. j av a2 s.c om CompareToBuilder builder = new CompareToBuilder(); builder.append(this.label, o.label, String.CASE_INSENSITIVE_ORDER); if ((this.key instanceof String) && (o.key instanceof String)) builder.append(this.key, o.key, String.CASE_INSENSITIVE_ORDER); else { builder.append(this.key, o.key); } builder.append(this.numPaddedSpaces, o.numPaddedSpaces); return builder.toComparison(); }
From source file:org.kuali.rice.core.api.util.ConcreteKeyValue.java
@Override public int compareTo(KeyValue o) { if (o == null) { throw new NullPointerException("o is null"); }//w w w . ja va 2 s . c om return new CompareToBuilder().append(this.getValue(), o.getValue(), String.CASE_INSENSITIVE_ORDER) .append(this.getKey(), o.getKey(), String.CASE_INSENSITIVE_ORDER).toComparison(); }
From source file:org.marketcetera.algo.BrokerAlgoSpec.java
@Override public int compareTo(BrokerAlgoSpec inOther) { return new CompareToBuilder().append(name, inOther.name).toComparison(); }
From source file:org.marketcetera.algo.BrokerAlgoTag.java
@Override public int compareTo(BrokerAlgoTag inOther) { return new CompareToBuilder().append(tagSpec, inOther.tagSpec).toComparison(); }