org.xwiki.rendering.wikimodel.util
Class HtmlEntityUtil

java.lang.Object
  extended by org.xwiki.rendering.wikimodel.util.HtmlEntityUtil

public class HtmlEntityUtil
extends Object

This class provides utility methods to access HTML entities with their respective descriptions and numerical codes.

Since:
4.0M1
Version:
$Id: a2666e678aa8bb21348a8029d623355baef96fb9 $

Constructor Summary
HtmlEntityUtil()
           
 
Method Summary
static char getChar(String symbol)
          A character corresponding to the given symbol.
static String getDescription(char ch)
          Returns description of the given character
static String getDescription(String symbol)
          Returns description of the given symbol.
static String getSymbol(char ch)
          Returns a symbol corresponding to the given character or null if nothing was found
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HtmlEntityUtil

public HtmlEntityUtil()
Method Detail

getChar

public static char getChar(String symbol)
A character corresponding to the given symbol.

Parameters:
symbol - for this symbol the corresponding character will be returned
Returns:
a character corresponding to the given symbol

getDescription

public static String getDescription(char ch)
Returns description of the given character

Parameters:
ch - for this character the corresponding description will be returned
Returns:
description of the given character

getDescription

public static String getDescription(String symbol)
Returns description of the given symbol.

Parameters:
symbol - for this symbol the corresponding description will be returned
Returns:
description of the given symbol

getSymbol

public static String getSymbol(char ch)
Returns a symbol corresponding to the given character or null if nothing was found

Parameters:
ch - for this character the corresponding symbol will be returned
Returns:
a symbol corresponding to the given character


Copyright © 2004–2015 XWiki. All rights reserved.