Class Tag

java.lang.Object
   |
   +----Tag

public class Tag
extends Object

Variable Index

 o str

Constructor Index

 o Tag(String)
Create a Tag object from a string.

Method Index

 o decStrToInt(String)
Converts a string to a non-negative integer.
 o getColorParam(String)
Read value of the parameter as Color.
 o getIntParam(String)
Read value of the parameter as a decimal integer
 o getStringParam(String)
Read value of the parameter as a string and convert it to upper case.
 o getStringParam(String, boolean)
Read value of the parameter as a string
 o getTargetParam(String)
Read value of the parameter as a target name.
 o getURLParam(String)
Read value of the parameter as URL name.
 o getValue()
Get name of the HTML tag.
 o hexStrToInt(String)
Converts a string to a non-negative integer.
 o isParam(String)
Check if the tag has the specified parameter

Variables

 o str
 private String str

Constructors

 o Tag
 public Tag(String tag_str)
Create a Tag object from a string. The string should contain an HTML tag.

Parameters:
tag_str - The string with the tag.

Methods

 o getValue
 public String getValue()
Get name of the HTML tag.

Returns:
Tag name.
 o isParam
 public boolean isParam(String param)
Check if the tag has the specified parameter

Parameters:
param - Parameter name
Returns:
true if such parameter exists, false otherwise.
 o getURLParam
 public String getURLParam(String param)
Read value of the parameter as URL name.

Parameters:
param - Parameter name.
Returns:
URL name or null.
 o getTargetParam
 public String getTargetParam(String param)
Read value of the parameter as a target name.

Parameters:
param - Parameter name.
Returns:
target name or null.
 o getColorParam
 public Color getColorParam(String param)
Read value of the parameter as Color.

Parameters:
param - Parameter name.
Returns:
Color.
 o getIntParam
 public int getIntParam(String param)
Read value of the parameter as a decimal integer

Parameters:
param - Parameter name.
Returns:
The integer ot -1
 o getStringParam
 public String getStringParam(String param)
Read value of the parameter as a string and convert it to upper case.

Parameters:
param - Parameter name.
Returns:
String value in upper case.
 o getStringParam
 public String getStringParam(String param,
                              boolean to_upper)
Read value of the parameter as a string

Parameters:
param - Parameter name.
to_upper - If true the resulting string is converted to upper case, if false it is returned as is.
Returns:
String value.
 o decStrToInt
 public static int decStrToInt(String str)
Converts a string to a non-negative integer.

Parameters:
str - String containing a decimal number.
Returns:
Non-negative integer value or -1 if the conversion is not possible.
 o hexStrToInt
 public static int hexStrToInt(String str)
Converts a string to a non-negative integer.

Parameters:
str - String containing a hex number.
Returns:
Non-negative integer value or -1 if the conversion is not possible.