mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-05-24 23:14:52 +00:00
trunk contents moved to root
This commit is contained in:
34
libsrc/jpproxy/src/com/jpexs/proxy/Key.java
Normal file
34
libsrc/jpproxy/src/com/jpexs/proxy/Key.java
Normal file
@@ -0,0 +1,34 @@
|
||||
package com.jpexs.proxy;
|
||||
|
||||
class Key {
|
||||
private String name = null;
|
||||
|
||||
/**
|
||||
* Create a Key.
|
||||
*/
|
||||
Key(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a lowercase hashCode.
|
||||
*/
|
||||
public int hashCode() {
|
||||
String s = name.toLowerCase();
|
||||
return s.hashCode();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a lowercase equals.
|
||||
*/
|
||||
public boolean equals(Object obj) {
|
||||
return name.equalsIgnoreCase(obj.toString());
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the key.
|
||||
*/
|
||||
public String toString() {
|
||||
return name;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user