Code Search for Developers
 
 
  

WootRow.java from PeerWriter at Krugle


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

PeerWriter

PeerWriter is a collaborative text editor. Multiple peers can edit the same document while they see overall changes in real-time. PeerWriter is based on a decentralized infrastructure, using a non-locking concurrency protocol ensuring global consistency.

Project homepage: http://sourceforge.net/projects/peerwriter
Programming language(s): Java,XML
License: gpl2

  Pool.java
  WootId.java
  WootPage.java
  WootRow.java