@Test public void testEquals() throws Exception { Assert.assertEquals(true, new ActionInfo().equals(new ActionInfo())); Random random = new Random(); ActionInfo actionInfo = new ActionInfo(random.nextLong(), random.nextLong(), " ", new HashMap<String, String>(), " ", " ", random.nextBoolean(), random.nextLong(), random.nextBoolean(), random.nextLong(), random.nextFloat()); Assert.assertEquals(true, actionInfo.equals(actionInfo)); Assert.assertEquals(false, actionInfo.equals(new Object())); Assert.assertEquals(false, new Object().equals(actionInfo)); Assert.assertEquals(false, actionInfo.equals(null)); ActionInfo actionInfo1 = new ActionInfo(1, 1, "test", new HashMap<String, String>(), "test", "test", true, 1, true, 1, 1.1f); ActionInfo actionInfo2 = new ActionInfo(1, 1, "test", new HashMap<String, String>(), "test", "test", true, 1, true, 1, 1.1f); Assert.assertEquals(true, actionInfo1.equals(actionInfo2)); actionInfo1 = new ActionInfo(1, 1, "test", new HashMap<String, String>(), "test", "test", true, 1, true, 1, 1.1f); actionInfo2 = new ActionInfo(1, 1, "test", new HashMap<String, String>(), "", "test", true, 1, true, 1, 1.1f); Assert.assertEquals(false, actionInfo1.equals(actionInfo2)); actionInfo1 = new ActionInfo(1, 1, "test", new HashMap<String, String>(), null, "test", true, 1, true, 1, 1.1f); actionInfo2 = new ActionInfo(1, 1, "test", new HashMap<String, String>(), null, "test", true, 1, true, 1, 1.1f); Assert.assertEquals(true, actionInfo1.equals(actionInfo2)); actionInfo1 = new ActionInfo(1, 1, "test", new HashMap<String, String>(), null, "test", true, 1, true, 1, 1.1f); actionInfo2 = new ActionInfo(1, 1, "test", new HashMap<String, String>(), " ", "test", true, 1, true, 1, 1.1f); Assert.assertEquals(false, actionInfo1.equals(actionInfo2)); actionInfo1 = new ActionInfo(1, 1, "test", new HashMap<String, String>(), "", "test", true, 1, true, 1, 1.1f); actionInfo2 = new ActionInfo(1, 1, "test", null, " ", "test", true, 1, true, 1, 1.1f); Assert.assertEquals(false, actionInfo1.equals(actionInfo2)); Assert.assertEquals(false, actionInfo2.equals(actionInfo1)); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ActionInfo that = (ActionInfo) o; return actionId == that.actionId && cmdletId == that.cmdletId && successful == that.successful && createTime == that.createTime && finished == that.finished && finishTime == that.finishTime && Float.compare(that.progress, progress) == 0 && Objects.equals(actionName, that.actionName) && Objects.equals(args, that.args) && Objects.equals(result, that.result) && Objects.equals(log, that.log); }
ActionInfo { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ActionInfo that = (ActionInfo) o; return actionId == that.actionId && cmdletId == that.cmdletId && successful == that.successful && createTime == that.createTime && finished == that.finished && finishTime == that.finishTime && Float.compare(that.progress, progress) == 0 && Objects.equals(actionName, that.actionName) && Objects.equals(args, that.args) && Objects.equals(result, that.result) && Objects.equals(log, that.log); } }
ActionInfo { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ActionInfo that = (ActionInfo) o; return actionId == that.actionId && cmdletId == that.cmdletId && successful == that.successful && createTime == that.createTime && finished == that.finished && finishTime == that.finishTime && Float.compare(that.progress, progress) == 0 && Objects.equals(actionName, that.actionName) && Objects.equals(args, that.args) && Objects.equals(result, that.result) && Objects.equals(log, that.log); } ActionInfo();  ActionInfo(long actionId, long cmdletId, String actionName,
      Map<String, String> args, String result, String log,
      boolean successful, long createTime, boolean finished,
      long finishTime, float progress); }
ActionInfo { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ActionInfo that = (ActionInfo) o; return actionId == that.actionId && cmdletId == that.cmdletId && successful == that.successful && createTime == that.createTime && finished == that.finished && finishTime == that.finishTime && Float.compare(that.progress, progress) == 0 && Objects.equals(actionName, that.actionName) && Objects.equals(args, that.args) && Objects.equals(result, that.result) && Objects.equals(log, that.log); } ActionInfo();  ActionInfo(long actionId, long cmdletId, String actionName,
      Map<String, String> args, String result, String log,
      boolean successful, long createTime, boolean finished,
      long finishTime, float progress); long getActionId(); void setActionId(long actionId); long getCmdletId(); void setCmdletId(long cmdletId); String getActionName(); void setActionName(String actionName); Map<String, String> getArgs(); void setArgs(Map<String, String> args); String getArgsJsonString(); void setArgsFromJsonString(String jsonArgs); String getResult(); void setResult(String result); void appendResult(String result); String getLog(); void setLog(String log); void appendLog(String log); void appendLogLine(String logLine); boolean isSuccessful(); void setSuccessful(boolean successful); long getCreateTime(); void setCreateTime(long createTime); boolean isFinished(); void setFinished(boolean finished); long getFinishTime(); void setFinishTime(long finishTime); float getProgress(); void setProgress(float progress); String getExecHost(); void setExecHost(String execHost); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); static Builder newBuilder(); }
ActionInfo { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ActionInfo that = (ActionInfo) o; return actionId == that.actionId && cmdletId == that.cmdletId && successful == that.successful && createTime == that.createTime && finished == that.finished && finishTime == that.finishTime && Float.compare(that.progress, progress) == 0 && Objects.equals(actionName, that.actionName) && Objects.equals(args, that.args) && Objects.equals(result, that.result) && Objects.equals(log, that.log); } ActionInfo();  ActionInfo(long actionId, long cmdletId, String actionName,
      Map<String, String> args, String result, String log,
      boolean successful, long createTime, boolean finished,
      long finishTime, float progress); long getActionId(); void setActionId(long actionId); long getCmdletId(); void setCmdletId(long cmdletId); String getActionName(); void setActionName(String actionName); Map<String, String> getArgs(); void setArgs(Map<String, String> args); String getArgsJsonString(); void setArgsFromJsonString(String jsonArgs); String getResult(); void setResult(String result); void appendResult(String result); String getLog(); void setLog(String log); void appendLog(String log); void appendLogLine(String logLine); boolean isSuccessful(); void setSuccessful(boolean successful); long getCreateTime(); void setCreateTime(long createTime); boolean isFinished(); void setFinished(boolean finished); long getFinishTime(); void setFinishTime(long finishTime); float getProgress(); void setProgress(float progress); String getExecHost(); void setExecHost(String execHost); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); static Builder newBuilder();  }