Show WootRow.java syntax highlighted
package fr.loria.ecoo.wooki.woot.core;
import java.io.Serializable;
/**
*
* @author nabil
*/
public class WootRow implements Comparable, Serializable {
private WootId wootId;
private boolean visible = true;
private String value;
// begin wootRow
public final static WootRow RB = new WootRow(WootId.bwid, "[", 0);
// end wootRow
public final static WootRow RE = new WootRow(WootId.ewid, "]", 0);
private int degree;
// contructors
public WootRow() {
};
public WootRow(WootId wid) {
this.wootId = wid;
}
public WootRow(WootId wootId, String value) {
this(wootId);
this.value = value;
}
public WootRow(WootId wootId, String value, int degree) {
this(wootId);
this.setValue(value);
this.setDegree(degree);
}
// getters
public WootId getWootId() {
return wootId;
}
public String getValue() {
return value;
}
// setters
public void setWid(WootId wootId) {
this.wootId = wootId;
}
public void setValue(String value) {
this.value = value;
}
public void setVisible(boolean visible) {
this.visible = visible;
}
public void setDegree(int degree) {
this.degree = degree;
}
// methods
public boolean isVisible() {
return visible;
}
public int compareTo(Object o) {
WootRow r = (WootRow) o;
return this.getWootId().compareTo(r.getWootId());
}
public String toString() {
return "(wRow " + wootId + "." + visible + "." + value + ")";
}
public int getDegree() {
return degree;
}
public boolean equals(Object o) {
// assert o instanceof WootRow;
if (!(o instanceof WootRow))
return false;
WootRow wr = (WootRow) o;
return this.wootId.equals(wr.getWootId());
}
}
See more files for this project here