@Test public void testEquals() { SerialId testSerialId0 = new SerialId("bob", 3, 6L, 12); SerialId testSerialId1 = new SerialId("bob", 3, 6L, 12); assertTrue(testSerialId0.equals(testSerialId0)); assertFalse(testSerialId0.equals(null)); assertTrue(testSerialId0.equals(testSerialId1)); testSerialId1.setBundleId(7L); assertFalse(testSerialId0.equals(testSerialId1)); testSerialId1.setBundleId(10L); assertTrue(testSerialId0.equals(testSerialId1)); testSerialId1.setBundleSize(7); assertFalse(testSerialId0.equals(testSerialId1)); testSerialId1.setBundleSize(3); assertTrue(testSerialId0.equals(testSerialId1)); testSerialId1.setRecordId(1); assertFalse(testSerialId0.equals(testSerialId1)); testSerialId1.setRecordId(0); assertTrue(testSerialId0.equals(testSerialId1)); testSerialId1.setStreamId(null); assertFalse(testSerialId0.equals(testSerialId1)); testSerialId0.setStreamId(null); assertTrue(testSerialId0.equals(testSerialId1)); testSerialId0.setStreamId("bob"); assertFalse(testSerialId1.equals(testSerialId0)); testSerialId1.setStreamId("allison"); assertFalse(testSerialId0.equals(testSerialId1)); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; SerialId other = (SerialId) obj; if (bundleId != other.bundleId) return false; if (bundleSize != other.bundleSize) return false; if (recordId != other.recordId) return false; if (streamId == null) { if (other.streamId != null) return false; } else if (!streamId.equals(other.streamId)) return false; return true; }
SerialId { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; SerialId other = (SerialId) obj; if (bundleId != other.bundleId) return false; if (bundleSize != other.bundleSize) return false; if (recordId != other.recordId) return false; if (streamId == null) { if (other.streamId != null) return false; } else if (!streamId.equals(other.streamId)) return false; return true; } }
SerialId { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; SerialId other = (SerialId) obj; if (bundleId != other.bundleId) return false; if (bundleSize != other.bundleSize) return false; if (recordId != other.recordId) return false; if (streamId == null) { if (other.streamId != null) return false; } else if (!streamId.equals(other.streamId)) return false; return true; } SerialId();  SerialId(String streamId, int bundleSize, 
         long bundleId, int recordId);  SerialId(String serialId);  SerialId(String streamId, 
         int bundleSize, long bundleId, int recordId,
         long serialNumber);  SerialId(JsonNode jsonNode); }
SerialId { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; SerialId other = (SerialId) obj; if (bundleId != other.bundleId) return false; if (bundleSize != other.bundleSize) return false; if (recordId != other.recordId) return false; if (streamId == null) { if (other.streamId != null) return false; } else if (!streamId.equals(other.streamId)) return false; return true; } SerialId();  SerialId(String streamId, int bundleSize, 
         long bundleId, int recordId);  SerialId(String serialId);  SerialId(String streamId, 
         int bundleSize, long bundleId, int recordId,
         long serialNumber);  SerialId(JsonNode jsonNode); int nextRecordId(); long nextSerialNumber(); SerialId nextSerialId(); synchronized long increment(); SerialId clone(); boolean isRightAfter(SerialId prev); boolean isRightBefore(SerialId next); String getStreamId(); SerialId setStreamId(String streamId); int getBundleSize(); SerialId setBundleSize(int bundleSize); long getBundleId(); SerialId setBundleId(long bundleId); SerialId addBundleId(long num); int getRecordId(); SerialId setRecordId(int recordId); SerialId addRecordId(int num); long getSerialNumber(); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); }
SerialId { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; SerialId other = (SerialId) obj; if (bundleId != other.bundleId) return false; if (bundleSize != other.bundleSize) return false; if (recordId != other.recordId) return false; if (streamId == null) { if (other.streamId != null) return false; } else if (!streamId.equals(other.streamId)) return false; return true; } SerialId();  SerialId(String streamId, int bundleSize, 
         long bundleId, int recordId);  SerialId(String serialId);  SerialId(String streamId, 
         int bundleSize, long bundleId, int recordId,
         long serialNumber);  SerialId(JsonNode jsonNode); int nextRecordId(); long nextSerialNumber(); SerialId nextSerialId(); synchronized long increment(); SerialId clone(); boolean isRightAfter(SerialId prev); boolean isRightBefore(SerialId next); String getStreamId(); SerialId setStreamId(String streamId); int getBundleSize(); SerialId setBundleSize(int bundleSize); long getBundleId(); SerialId setBundleId(long bundleId); SerialId addBundleId(long num); int getRecordId(); SerialId setRecordId(int recordId); SerialId addRecordId(int num); long getSerialNumber(); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj);  }