/**
* Packer version 3.0 (final)
* Copyright 2004-2007, Dean Edwards
* Web: {@link http://dean.edwards.name/}
*
* This software is licensed under the MIT license
* Web: {@link http://www.opensource.org/licenses/mit-license}
*
* Ported to Java by Pablo Santiago based on C# version by Jesse Hansen, <twindagger2k @ msn.com>
* Web: {@link http://jpacker.googlecode.com/}
* Email: <pablo.santiago @ gmail.com>
*/
package com.jpacker;
/**
* Wrapper class for a keyword
*
* @author Pablo Santiago <pablo.santiago @ gmail.com>
*/
public class JPackerWord {
private int count = 0;
private String encoded = "";
private int index = -1;
private String word;
private String replacement;
public JPackerWord(String word) {
this.word = word;
}
public int getCount() {
return count;
}
public void setCount(int count) {
this.count = count;
}
public String getEncoded() {
return encoded;
}
public void setEncoded(String encoded) {
this.encoded = encoded;
}
public int getIndex() {
return index;
}
public void setIndex(int index) {
this.index = index;
}
public String getWord() {
return word;
}
public void setWord(String word) {
this.word = word;
}
public String getReplacement() {
return replacement;
}
public void setReplacement(String replacement) {
this.replacement = replacement;
}
@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final JPackerWord other = (JPackerWord) obj;
if ((this.word == null) ? (other.word != null) : !this.word.equals(other.word)) {
return false;
}
return true;
}
@Override
public int hashCode() {
int hash = 3;
hash = 37 * hash + (this.word != null ? this.word.hashCode() : 0);
return hash;
}
@Override
public String toString() {
return word;
}
}