public class AclfNetObjectComparator
extends java.lang.Object
| Constructor and Description |
|---|
AclfNetObjectComparator(AclfNetwork aclfNet1,
AclfNetwork aclfNet2)
Constructor for AclfNetObjectComparator.
|
AclfNetObjectComparator(AclfNetwork aclfNet1,
AclfNetwork aclfNet2,
boolean debug)
Constructor for AclfNetObjectComparator.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
compareBranch(java.lang.String branchId)
Compare the branch objects in the two AclfNetwork objects by their IDs.
|
boolean |
compareBus(java.lang.String busId)
Compare the bus objects in the two AclfNetwork objects by their IDs.
|
void |
compareNetwork()
Compare the two AclfNetwork objects field by field, using the aclfNet1 as the base.
|
static boolean |
compareObjectsByFields(java.lang.Object obj1,
java.lang.Object obj2,
java.lang.String desc,
java.util.List<java.lang.String> diffMsgList)
Compares two objects field by field, using reflection.
|
boolean |
compareSpecialBranch(java.lang.String branchId)
Compare the special branch objects in the two AclfNetwork objects by their IDs.
|
boolean |
compareSubstation(java.lang.String subId)
Compare the substation objects in the two AclfNetwork objects by their IDs.
|
java.util.List<java.lang.String> |
getDiffMsgList() |
public AclfNetObjectComparator(AclfNetwork aclfNet1, AclfNetwork aclfNet2, boolean debug)
aclfNet1 - the AclfNetwork object as the base for the comparisonaclfNet2 - the AclfNetwork object to be compareddebug - a boolean flag to control debug outputpublic AclfNetObjectComparator(AclfNetwork aclfNet1, AclfNetwork aclfNet2)
aclfNet1 - the AclfNetwork object as the base for the comparisonaclfNet2 - the AclfNetwork object to be comparedpublic java.util.List<java.lang.String> getDiffMsgList()
public void compareNetwork()
public boolean compareSubstation(java.lang.String subId)
subId - the ID of the substation to be comparedpublic boolean compareBus(java.lang.String busId)
busId - the ID of the bus to be comparedpublic boolean compareBranch(java.lang.String branchId)
branchId - the ID of the branch to be comparedpublic boolean compareSpecialBranch(java.lang.String branchId)
branchId - the ID of the special branch to be comparedpublic static boolean compareObjectsByFields(java.lang.Object obj1,
java.lang.Object obj2,
java.lang.String desc,
java.util.List<java.lang.String> diffMsgList)
obj1 - the first object as the base for the comparisonobj2 - the second object to be compareddesc - a description of the top-leve objects being compared, used for logging differencesdiffMsgList - a list to hold the difference messages if any differences are found