edu.wpi.cs.cs509.clipboard
Class Item

java.lang.Object
  |
  +--edu.wpi.cs.cs509.clipboard.Item
All Implemented Interfaces:
IItem

public class Item
extends java.lang.Object
implements IItem

A Typed Information on the clipboard.

Author:
George T. Heineman

Field Summary
protected  java.lang.Object obj
          The instance of this Item.
protected  IDataType type
          The type of this Item.
 
Constructor Summary
Item(DataType type, java.lang.Object obj)
          Construct an Item for this type and object.
Item(Item i)
          Duplicates the given item.
 
Method Summary
 java.lang.Object getObject()
          Return object associated with this Item
 IDataType getType()
          Return type associated with this Item
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

type

protected IDataType type
The type of this Item.


obj

protected java.lang.Object obj
The instance of this Item.

Constructor Detail

Item

public Item(DataType type,
            java.lang.Object obj)
Construct an Item for this type and object.

Parameters:
type - edu.wpi.cs.cs509.graph.clipboard.DataType
Throws:
java.lang.Exception - if type or obj is null.

Item

public Item(Item i)
Duplicates the given item.

Parameters:
i - edu.wpi.cs.cs509.graph.clipboard.Item
Method Detail

getObject

public java.lang.Object getObject()
Return object associated with this Item

Specified by:
getObject in interface IItem
Returns:
Object

getType

public IDataType getType()
Return type associated with this Item

Specified by:
getType in interface IItem
Returns:
DataType