TagW implements Serializable { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } TagW other = (TagW) obj; if (id != other.id) { return false; } if (keyword == null) { if (other.keyword != null) { return false; } } else if (!keyword.equals(other.keyword)) { return false; } return true; } TagW(int id, String keyword, String displayedName, TagType type, int vmMin, int vmMax, Object defaultValue);  TagW(int id, String keyword, TagType type, int vmMin, int vmMax);  TagW(int id, String keyword, String displayedName, TagType type);  TagW(int id, String keyword, TagType type);  TagW(String name, TagType type, int vmMin, int vmMax);  TagW(String keyword, String displayedName, TagType type);  TagW(String keyword, TagType type); int getId(); String getKeyword(); String getDisplayedName(); TagType getType(); int getValueMultiplicity(); boolean isTypeCompliant(Object value); static int getValueMultiplicity(Object value); static Object getValueFromIndex(Object value, int index); @Override String toString(); @Override boolean equals(Object obj); @Override int hashCode(); void readValue(Object data, Tagable tagable); Object getValue(Object data); boolean isStringFamilyType(); synchronized int getAnonymizationType(); synchronized void setAnonymizationType(int anonymizationType); String getFormattedTagValue(Object value, String format); static void addTag(TagW tag); static TagW get(String keyword); static T getTagValue(TagReadable tagable, TagW tag, Class<T> type); static final String NO_VALUE; static final TagW UnknownTag; static final TagW Group; static final TagW PatientPseudoUID; static final TagW SeriesLoading; static final TagW Thumbnail; static final TagW ThumbnailPath; static final TagW ExplorerModel; static final TagW PresentationModel; static final TagW PresentationModelBirary; static final TagW SplitSeriesNumber; static final TagW SeriesSelected; static final TagW SeriesOpen; static final TagW SeriesFocused; static final TagW ImageWidth; static final TagW ImageHeight; static final TagW ImageDepth; static final TagW ImageOrientationPlane; static final TagW ImageBitsPerPixel; static final TagW ImageCache; static final TagW ShutterFinalShape; static final TagW ShutterRGBColor; static final TagW ShutterPSValue; static final TagW OverlayBitMask; static final TagW OverlayBurninDataPath; static final TagW HasOverlay; static final TagW ObjectToSave; static final TagW WadoCompressionRate; static final TagW WadoTransferSyntaxUID; static final TagW DirectDownloadFile; static final TagW DirectDownloadThumbnail; static final TagW ReadFromDicomdir; static final TagW WadoParameters; static final TagW WadoInstanceReferenceList; static final TagW DicomSpecialElementList; static final TagW SlicePosition; static final TagW SuvFactor; static final TagW RootElement; static final TagW FilePath; static final TagW FileName; static final TagW CurrentFolder; static final TagW Checked; static final TagW SubseriesInstanceUID; static final TagW VOILUTsExplanation; static final TagW VOILUTsData; static final TagW ModalityLUTExplanation; static final TagW ModalityLUTType; static final TagW ModalityLUTData; static final TagW PRLUTsExplanation; static final TagW PRLUTsData; static final TagW MonoChrome; }
@Test public void test_equals() throws Exception { TagW t1, t2; t1 = new TagW(KEYWORD_1, TagType.STRING); assertThat(t1.equals(t1)).isTrue(); assertThat(t1.equals(null)).isFalse(); assertThat(t1.equals(KEYWORD_1)).isFalse(); t1 = new TagW(KEYWORD_1, TagType.STRING); t2 = new TagW(KEYWORD_1, TagType.STRING); assertThat(t1.equals(t2)).isFalse(); t1 = new TagW(ID_1, null, TagType.DICOM_PERSON_NAME); t2 = new TagW(ID_1, KEYWORD_1, TagType.DICOM_PERSON_NAME); assertThat(t1.equals(t2)).isFalse(); t1 = new TagW(ID_1, KEYWORD_1, TagType.DICOM_PERSON_NAME); t2 = new TagW(ID_1, KEYWORD_2, TagType.DICOM_PERSON_NAME); assertThat(t1.equals(t2)).isFalse(); t1 = new TagW(ID_1, KEYWORD_1, TagType.DICOM_PERSON_NAME); t2 = new TagW(ID_1, KEYWORD_1, TagType.DICOM_PERSON_NAME); assertThat(t1.equals(t2)).isTrue(); t1 = new TagW(ID_1, null, TagType.DICOM_PERSON_NAME); t2 = new TagW(ID_1, null, TagType.DICOM_PERSON_NAME); assertThat(t1.equals(t2)).isTrue(); }