de.doncarnage.minecraft.babble.patterns.constant.ReversePattern.java Source code

Java tutorial

Introduction

Here is the source code for de.doncarnage.minecraft.babble.patterns.constant.ReversePattern.java

Source

/*
 *     Babble
 *   Copyright (C) 2014 Viciouss <http://www.doncarnage.de>
 *
 *   This program is free software; you can redistribute it and/or
 *   modify it under the terms of the GNU Lesser General Public
 *   License as published by the Free Software Foundation; either
 *   version 3 of the License, or (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *   Lesser General Public License for more details.
 *
 *   You should have received a copy of the GNU Lesser General Public
 *   License along with this library; if not, write to the Free Software
 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301
 *   USA
 */

package de.doncarnage.minecraft.babble.patterns.constant;

import org.apache.commons.lang.StringUtils;

import de.doncarnage.minecraft.babble.patterns.AbstractBasePattern;

/**
 * This pattern returns a reversal of the input string.
 * 
 * @author Viciouss
 * 
 */
public class ReversePattern extends AbstractBasePattern {

    @Override
    public String transformString(String original) {
        return StringUtils.reverse(original);
    }

}