@Test public void testEqual() { String testTitle = "Equal"; LOG.info("[Test] "+testTitle); Action action1 = null; Action action2 = null; RequestPolicy notAction = null; assertTrue("Same null action should be equal", ActionUtils.equal(action1, action1)); assertTrue("Null actions should be equal", ActionUtils.equal(action1, action2)); assertTrue("Null action and null object should be equal", ActionUtils.equal(action1, notAction)); action1 = new Action(); action2 = new Action(); notAction = new RequestPolicy(); assertTrue("Same empty action should be equal", ActionUtils.equal(action1, action1)); assertTrue("Empty actions should be equal", ActionUtils.equal(action1, action2)); assertTrue("Empty actions should be equal (inverse)", ActionUtils.equal(action2, action1)); assertFalse("Empty action and empty object should not be equal", ActionUtils.equal(action1, notAction)); action1 = ActionUtils.create(ActionConstants.READ); assertTrue("Same action should be equal", ActionUtils.equal(action1, action1)); assertFalse("Different actions should be equal", ActionUtils.equal(action1, action2)); assertFalse("Different actions should be equal (inverse)", ActionUtils.equal(action2, action1)); action2 = ActionUtils.create(ActionConstants.WRITE); assertFalse("Different actions should not be equal (2)", ActionUtils.equal(action1, action2)); assertFalse("Different actions should not be equal (inverse) (2)", ActionUtils.equal(action2, action1)); action2 = ActionUtils.create(ActionConstants.READ, true); assertFalse("Different actions should not be equal (2)", ActionUtils.equal(action1, action2)); assertFalse("Different actions should not be equal (inverse) (2)", ActionUtils.equal(action2, action1)); action2 = ActionUtils.create(ActionConstants.READ); assertTrue("Equal actions should be equal", ActionUtils.equal(action1, action2)); assertTrue("Equal actions should be equal (inverse)", ActionUtils.equal(action2, action1)); assertFalse("action and object should not be equal", ActionUtils.equal(action1, notAction)); }
public static boolean equal(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action o1, Object o2, boolean dontCheckOptional) { if (o1 == o2) { return true; } if (o2 == null) { return false; } if (o1 == null) { return false; } if (o1.getClass() != o2.getClass()) { return false; } org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action ro2 = (org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action) o2; return (ActionConstantsUtils.equal(o1.getActionConstant(), ro2.getActionConstant())) && (dontCheckOptional || o1.isOptional() == ro2.isOptional()); }
ActionUtils { public static boolean equal(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action o1, Object o2, boolean dontCheckOptional) { if (o1 == o2) { return true; } if (o2 == null) { return false; } if (o1 == null) { return false; } if (o1.getClass() != o2.getClass()) { return false; } org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action ro2 = (org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action) o2; return (ActionConstantsUtils.equal(o1.getActionConstant(), ro2.getActionConstant())) && (dontCheckOptional || o1.isOptional() == ro2.isOptional()); } }
ActionUtils { public static boolean equal(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action o1, Object o2, boolean dontCheckOptional) { if (o1 == o2) { return true; } if (o2 == null) { return false; } if (o1 == null) { return false; } if (o1.getClass() != o2.getClass()) { return false; } org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action ro2 = (org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action) o2; return (ActionConstantsUtils.equal(o1.getActionConstant(), ro2.getActionConstant())) && (dontCheckOptional || o1.isOptional() == ro2.isOptional()); }  }
ActionUtils { public static boolean equal(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action o1, Object o2, boolean dontCheckOptional) { if (o1 == o2) { return true; } if (o2 == null) { return false; } if (o1 == null) { return false; } if (o1.getClass() != o2.getClass()) { return false; } org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action ro2 = (org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action) o2; return (ActionConstantsUtils.equal(o1.getActionConstant(), ro2.getActionConstant())) && (dontCheckOptional || o1.isOptional() == ro2.isOptional()); }  static org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action create(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.ActionConstants actionConstant); static org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action create(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.ActionConstants actionConstant, boolean optional); static org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action create(String actionConstantValue, boolean optional); static List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action> createList(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.ActionConstants... actionConstants); static String getFriendlyName(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action entry); static List<String> getFriendlyName(List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action> haystack); static String getFriendlyDescription(List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action> haystack); static String getFriendlyDescription(List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action> haystack, boolean displayOptionalString); static String toXmlString(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action action); static String toXmlString(List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action> actions); static String toString(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action action); static String toString(List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action> actions); static boolean atLeast1MandatoryAction(List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action> actions); static boolean equal(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action o1, Object o2, boolean dontCheckOptional); @Deprecated static boolean equals(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action o1, Object o2); static boolean equal(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action o1, Object o2); static boolean equal(List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action> o1, Object o2); @Deprecated static boolean equals(List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action> o1, Object o2); static boolean contain(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action needle, List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action> haystack); static boolean contains(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action needle, List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action> haystack); static boolean containAllMandotory(List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action> needles, List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action> haystack); static boolean contains(List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action> actionsToCheck, List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action> actions); static boolean contains(List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action> actionsToCheck, List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action> actions, List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action> intersection); static boolean containsOr(List<Action> actionsToCheck, List<Action> actions); static List<Action> intersect(List<Action> actionsToCheck, List<Action> actions); static Action toAction(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action actionBean); static List<Action> toActions(List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action> actionBeans); static org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action toActionBean(Action action); static List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action> toActionBeans(List<Action> actions); }
ActionUtils { public static boolean equal(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action o1, Object o2, boolean dontCheckOptional) { if (o1 == o2) { return true; } if (o2 == null) { return false; } if (o1 == null) { return false; } if (o1.getClass() != o2.getClass()) { return false; } org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action ro2 = (org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action) o2; return (ActionConstantsUtils.equal(o1.getActionConstant(), ro2.getActionConstant())) && (dontCheckOptional || o1.isOptional() == ro2.isOptional()); }  static org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action create(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.ActionConstants actionConstant); static org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action create(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.ActionConstants actionConstant, boolean optional); static org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action create(String actionConstantValue, boolean optional); static List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action> createList(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.ActionConstants... actionConstants); static String getFriendlyName(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action entry); static List<String> getFriendlyName(List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action> haystack); static String getFriendlyDescription(List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action> haystack); static String getFriendlyDescription(List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action> haystack, boolean displayOptionalString); static String toXmlString(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action action); static String toXmlString(List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action> actions); static String toString(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action action); static String toString(List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action> actions); static boolean atLeast1MandatoryAction(List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action> actions); static boolean equal(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action o1, Object o2, boolean dontCheckOptional); @Deprecated static boolean equals(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action o1, Object o2); static boolean equal(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action o1, Object o2); static boolean equal(List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action> o1, Object o2); @Deprecated static boolean equals(List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action> o1, Object o2); static boolean contain(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action needle, List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action> haystack); static boolean contains(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action needle, List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action> haystack); static boolean containAllMandotory(List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action> needles, List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action> haystack); static boolean contains(List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action> actionsToCheck, List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action> actions); static boolean contains(List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action> actionsToCheck, List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action> actions, List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action> intersection); static boolean containsOr(List<Action> actionsToCheck, List<Action> actions); static List<Action> intersect(List<Action> actionsToCheck, List<Action> actions); static Action toAction(org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action actionBean); static List<Action> toActions(List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action> actionBeans); static org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action toActionBean(Action action); static List<org.societies.api.schema.privacytrust.privacy.model.privacypolicy.Action> toActionBeans(List<Action> actions); static Map<String, String> map2FriendlyName; }