org.schmant.arg
Class RenamedFile

java.lang.Object
  extended by org.schmant.support.AbstractArgumentChecker
      extended by org.schmant.arg.RenamedFile

public class RenamedFile
extends AbstractArgumentChecker

This object can be used to pretend that a NamedReadableFile has another name. It is understood by InterpretAsNamedReadableFileStrategy.

Since:
0.5
Author:
Karl Gustafsson

Constructor Summary
RenamedFile(Object f, String name)
          Create a new renamed file.
 
Method Summary
 Object getFile()
           
 String getName()
           
 String toString()
           
 
Methods inherited from class org.schmant.support.AbstractArgumentChecker
check, check, check, check
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RenamedFile

public RenamedFile(Object f,
                   String name)
            throws NullPointerException
Create a new renamed file.

Parameters:
f - The file.
name - The new name for the file.
Throws:
NullPointerException - If any of the arguments are null.
Method Detail

getFile

public Object getFile()

getName

public String getName()

toString

public String toString()
Overrides:
toString in class Object