public class Item
extends java.lang.Object
implements java.io.Serializable
Item
object.Constructor and Description |
---|
Item()
Constructs an
Item object. |
Item(java.lang.String content)
Constructs an
Item from content . |
Item(java.lang.String content,
DataType type)
Constructs an
Item from content . |
Item(java.lang.String name,
java.lang.String content)
Constructs an
Item with the specified name from
content . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Tests for equals against the passed-in object.
|
java.lang.String |
getContent()
Retrieves the item contents.
|
java.lang.String |
getName()
Retrieves the item name.
|
DataType |
getType()
Retrieves the type.
|
int |
hashCode()
The hash code of an item.
|
void |
setContent(java.lang.String content)
Sets the item contents.
|
void |
setName(java.lang.String name)
Sets the item name.
|
void |
setType(DataType type)
Sets the type.
|
java.lang.String |
toString() |
public Item()
Item
object.public Item(java.lang.String content)
Item
from content
.content
- The item's content.public Item(java.lang.String content, DataType type)
Item
from content
.content
- The item's content.public Item(java.lang.String name, java.lang.String content)
Item
with the specified name from
content
.name
- The item name.content
- The item's content.public DataType getType()
public void setType(DataType type)
type
- The mType to set.public java.lang.String getContent()
public void setContent(java.lang.String content)
content
- A string containing the item contents.public java.lang.String getName()
public void setName(java.lang.String name)
name
- A string containing the item name.public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- An object.true
if the passed-in object is a non-null item and
its name and content attribute equal that of this this
Item
. A null name is considered equal to another
null name; A null content is considered equal to another null
content attribute.public java.lang.String toString()
toString
in class java.lang.Object