Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
faa9823
commit df9917a
Showing
12 changed files
with
174 additions
and
142 deletions.
There are no files selected for viewing
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
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
39 changes: 39 additions & 0 deletions
39
rapidoid-commons/src/main/java/org/rapidoid/io/ResKey.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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package org.rapidoid.io; | ||
|
||
import org.rapidoid.annotation.Authors; | ||
import org.rapidoid.annotation.Since; | ||
|
||
import java.util.Arrays; | ||
|
||
@Authors("Nikolche Mihajlovski") | ||
@Since("5.0.11") | ||
public class ResKey { | ||
|
||
final String filename; | ||
final String[] possibleLocations; | ||
|
||
public ResKey(String filename, String[] possibleLocations) { | ||
this.filename = filename; | ||
this.possibleLocations = possibleLocations; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) return true; | ||
if (o == null || getClass() != o.getClass()) return false; | ||
|
||
ResKey resKey = (ResKey) o; | ||
|
||
if (!filename.equals(resKey.filename)) return false; | ||
|
||
return Arrays.equals(possibleLocations, resKey.possibleLocations); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
int result = filename.hashCode(); | ||
result = 31 * result + Arrays.hashCode(possibleLocations); | ||
return result; | ||
} | ||
|
||
} |
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
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
ABC1 |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
ABC2 |
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
Oops, something went wrong.