@Test public void testEquals() { MInput<Integer> input1 = new MIntegerInput("sqoopsqoop1", false, InputEditable.ANY, StringUtils.EMPTY ); MInput<Integer> input2 = new MIntegerInput("sqoopsqoop2", false, InputEditable.ANY, StringUtils.EMPTY ); List<MInput<?>> list1 = new ArrayList<MInput<?>>(); list1.add(input1); list1.add(input2); MConfig mConfig1 = new MConfig("config", list1); MInput<Integer> input3 = new MIntegerInput("sqoopsqoop1", false, InputEditable.ANY, StringUtils.EMPTY ); MInput<Integer> input4 = new MIntegerInput("sqoopsqoop2", false, InputEditable.ANY, StringUtils.EMPTY ); List<MInput<?>> list2 = new ArrayList<MInput<?>>(); list2.add(input3); list2.add(input4); MConfig mConfig2 = new MConfig("config", list2); assertEquals(mConfig2, mConfig1); }
@Override public boolean equals(Object other) { if (other == this) { return true; } if (!(other instanceof MConfig)) { return false; } MConfig mf = (MConfig) other; return getName().equals(mf.getName()) && inputs.equals(mf.inputs); }
MConfig extends MValidatedElement implements MClonable { @Override public boolean equals(Object other) { if (other == this) { return true; } if (!(other instanceof MConfig)) { return false; } MConfig mf = (MConfig) other; return getName().equals(mf.getName()) && inputs.equals(mf.inputs); } }
MConfig extends MValidatedElement implements MClonable { @Override public boolean equals(Object other) { if (other == this) { return true; } if (!(other instanceof MConfig)) { return false; } MConfig mf = (MConfig) other; return getName().equals(mf.getName()) && inputs.equals(mf.inputs); } MConfig(String name, List<MInput<?>> inputs); }
MConfig extends MValidatedElement implements MClonable { @Override public boolean equals(Object other) { if (other == this) { return true; } if (!(other instanceof MConfig)) { return false; } MConfig mf = (MConfig) other; return getName().equals(mf.getName()) && inputs.equals(mf.inputs); } MConfig(String name, List<MInput<?>> inputs); List<MInput<?>> getInputs(); Set<String> getInputNames(); Set<String> getUserOnlyEditableInputNames(); MInput<?> getInput(String inputName); MStringInput getStringInput(String inputName); MEnumInput getEnumInput(String inputName); MIntegerInput getIntegerInput(String inputName); MLongInput getLongInput(String inputName); MBooleanInput getBooleanInput(String inputName); MMapInput getMapInput(String inputName); @Override String toString(); @Override boolean equals(Object other); @Override int hashCode(); @Override MConfig clone(boolean cloneWithValue); }
MConfig extends MValidatedElement implements MClonable { @Override public boolean equals(Object other) { if (other == this) { return true; } if (!(other instanceof MConfig)) { return false; } MConfig mf = (MConfig) other; return getName().equals(mf.getName()) && inputs.equals(mf.inputs); } MConfig(String name, List<MInput<?>> inputs); List<MInput<?>> getInputs(); Set<String> getInputNames(); Set<String> getUserOnlyEditableInputNames(); MInput<?> getInput(String inputName); MStringInput getStringInput(String inputName); MEnumInput getEnumInput(String inputName); MIntegerInput getIntegerInput(String inputName); MLongInput getLongInput(String inputName); MBooleanInput getBooleanInput(String inputName); MMapInput getMapInput(String inputName); @Override String toString(); @Override boolean equals(Object other); @Override int hashCode(); @Override MConfig clone(boolean cloneWithValue);  }