org.raml.parser.utils
Class Inflector

java.lang.Object
  extended by org.raml.parser.utils.Inflector

public class Inflector
extends Object


Constructor Summary
Inflector()
           
 
Method Summary
static String camelize(String dash)
          Generates a camel case version of a phrase from dash.
static String capitalize(String word)
          Capitalizes a word - only a first character is converted to upper case.
static String pluralize(String word)
           
static String singularize(String word)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Inflector

public Inflector()
Method Detail

pluralize

public static String pluralize(String word)

singularize

public static String singularize(String word)

camelize

public static String camelize(String dash)
Generates a camel case version of a phrase from dash.

Parameters:
dash - dash version of a word to converted to camel case.
Returns:
camel case version of dash.

capitalize

public static String capitalize(String word)
Capitalizes a word - only a first character is converted to upper case.

Parameters:
word - word/phrase to capitalize.
Returns:
same as input argument, but the first character is capitalized.


Copyright © 2013. All rights reserved.