edu.rice.cs.drjava.model
Class ClipboardHistoryModel

java.lang.Object
  extended by edu.rice.cs.drjava.model.ClipboardHistoryModel

public class ClipboardHistoryModel
extends Object

Model class for clipboard history.


Method Summary
 String getMostRecent()
          Return the most recent string, or null if nothing is in the history.
 List<String> getStrings()
          Return a copy of the history of strings.
 void put(String s)
          Add a string to the history.
 void resize(int maxSize)
          Sets the maximum size.
static ClipboardHistoryModel singleton()
          Singleton accessor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

singleton

public static ClipboardHistoryModel singleton()
Singleton accessor.


resize

public void resize(int maxSize)
Sets the maximum size. May kick old strings out.


put

public void put(String s)
Add a string to the history. If it is already in the history, it will get moved to the end, making it the most recent string.


getStrings

public List<String> getStrings()
Return a copy of the history of strings.


getMostRecent

public String getMostRecent()
Return the most recent string, or null if nothing is in the history.