edu.northwestern.at.wordhoard.model.wrappers
Class MemoryTextWrapper

java.lang.Object
  extended by edu.northwestern.at.wordhoard.model.wrappers.MemoryTextWrapper
All Implemented Interfaces:
TextWrapped

public class MemoryTextWrapper
extends java.lang.Object
implements TextWrapped

A text wrapper from s remote source.

This class wraps a Text object.

This wraps a text from a remote source, such as an annotation system.


Constructor Summary
MemoryTextWrapper()
          Creates a new text wrapper.
MemoryTextWrapper(Text text)
          Creates a new text wrapper.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Returns true if some other object is equal to this one.
 java.lang.String getId()
          Gets the unique id.
 Text getText()
          Gets the text.
 int hashCode()
          Returns a hash code for the object.
 void setText(Text text)
          Sets the text.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MemoryTextWrapper

public MemoryTextWrapper()
Creates a new text wrapper.


MemoryTextWrapper

public MemoryTextWrapper(Text text)
Creates a new text wrapper.

Parameters:
text - Text.
Method Detail

getId

public java.lang.String getId()
Gets the unique id.

Returns:
The unique id.

getText

public Text getText()
Gets the text.

Specified by:
getText in interface TextWrapped
Returns:
The text.

setText

public void setText(Text text)
Sets the text.

Specified by:
setText in interface TextWrapped
Parameters:
text - The text.

equals

public boolean equals(java.lang.Object obj)
Returns true if some other object is equal to this one.

The two work parts are equal if their ids are equal.

Specified by:
equals in interface TextWrapped
Overrides:
equals in class java.lang.Object
Parameters:
obj - The other object.
Returns:
True if this object equals the other object.

hashCode

public int hashCode()
Returns a hash code for the object.

Specified by:
hashCode in interface TextWrapped
Overrides:
hashCode in class java.lang.Object
Returns:
The hash code.