edu.nrao.sss.clipboard
Class ClipBoard

java.lang.Object
  extended by edu.nrao.sss.clipboard.ClipBoard

public class ClipBoard
extends Object

This ClipBoard will hold a Collection of Cloneable objects. Objects are retrieved from the ClipBoard by passing the getContents() method a Class object representing the type of objects you want to get out. calling setContentItem or setContentItems will remove any previous ClipBoard contents. All items put into the clip board must implement cloneable. Items are cloned when they are inserted into the ClipBoard and cloned again when they are retrieved. All methods in this class are synchronized.


Constructor Summary
ClipBoard()
           
 
Method Summary
 void addContentItem(Cloneable item)
           
 void addContentItems(Collection<Cloneable> items)
           
 void clear()
           
 boolean containsType(Class<?> c)
           
 List<Cloneable> getContents()
           
<T extends Cloneable>
List<T>
getContents(Class<T> c)
           
 boolean isEmpty()
           
 void setContentItem(Cloneable item)
           
 void setContentItems(Collection<Cloneable> items)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClipBoard

public ClipBoard()
Method Detail

isEmpty

public boolean isEmpty()

clear

public void clear()

getContents

public List<Cloneable> getContents()

getContents

public <T extends Cloneable> List<T> getContents(Class<T> c)

containsType

public boolean containsType(Class<?> c)

setContentItems

public void setContentItems(Collection<Cloneable> items)
                     throws IllegalArgumentException
Throws:
IllegalArgumentException

setContentItem

public void setContentItem(Cloneable item)
                    throws IllegalArgumentException
Throws:
IllegalArgumentException

addContentItems

public void addContentItems(Collection<Cloneable> items)
                     throws IllegalArgumentException
Throws:
IllegalArgumentException

addContentItem

public void addContentItem(Cloneable item)
                    throws IllegalArgumentException
Throws:
IllegalArgumentException


Copyright © 2009. All Rights Reserved.