net.coobird.thumbnailator
Class Rename

java.lang.Object
  extended by net.coobird.thumbnailator.Rename

public abstract class Rename
extends Object

This class is used to rename file names.

Author:
coobird

Field Summary
static Rename NO_CHANGE
          A Rename which does not alter the given file name.
static Rename PREFIX_DOT_THUMBNAIL
          Appends thumbnail. to the beginning of the file name.
static Rename PREFIX_HYPTHEN_THUMBNAIL
          Appends thumbnail- to the beginning of the file name.
static Rename SUFFIX_DOT_THUMBNAIL
          Appends .thumbnail to the file name prior to the extension of the file.
static Rename SUFFIX_HYPTHEN_THUMBNAIL
          Appends -thumbnail to the file name prior to the extension of the file.
 
Method Summary
abstract  String apply(String name)
          Applies the function performed by this Rename on the specified name.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NO_CHANGE

public static final Rename NO_CHANGE
A Rename which does not alter the given file name.

Example


PREFIX_DOT_THUMBNAIL

public static final Rename PREFIX_DOT_THUMBNAIL
Appends thumbnail. to the beginning of the file name.

Example


PREFIX_HYPTHEN_THUMBNAIL

public static final Rename PREFIX_HYPTHEN_THUMBNAIL
Appends thumbnail- to the beginning of the file name.

Example


SUFFIX_DOT_THUMBNAIL

public static final Rename SUFFIX_DOT_THUMBNAIL
Appends .thumbnail to the file name prior to the extension of the file.

Example


SUFFIX_HYPTHEN_THUMBNAIL

public static final Rename SUFFIX_HYPTHEN_THUMBNAIL
Appends -thumbnail to the file name prior to the extension of the file.

Example

Method Detail

apply

public abstract String apply(String name)
Applies the function performed by this Rename on the specified name.

Parameters:
name - Name to apply the function on.
Returns:
The name after the function has been applied.