This repository has been archived by the owner on Nov 9, 2017. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #66 from zanata/globalid-equals
Add equals and hashcode to GlobalDocumentId
- Loading branch information
Showing
2 changed files
with
32 additions
and
13 deletions.
There are no files selected for viewing
20 changes: 8 additions & 12 deletions
20
zanata-war/src/main/java/org/zanata/file/GlobalDocumentId.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,16 @@ | ||
package org.zanata.file; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.Getter; | ||
import lombok.NonNull; | ||
|
||
@Getter | ||
@AllArgsConstructor | ||
@EqualsAndHashCode | ||
public class GlobalDocumentId | ||
{ | ||
|
||
private final String projectSlug; | ||
private final String versionSlug; | ||
private final String docId; | ||
|
||
public GlobalDocumentId(String projectSlug, String versionSlug, String docId) | ||
{ | ||
this.projectSlug = projectSlug; | ||
this.versionSlug = versionSlug; | ||
this.docId = docId; | ||
} | ||
|
||
@NonNull private final String projectSlug; | ||
@NonNull private final String versionSlug; | ||
@NonNull private final String docId; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters