Package com.helger.html.hc.html
Class HC_Target
- java.lang.Object
-
- com.helger.html.hc.html.HC_Target
-
- All Implemented Interfaces:
IHCHasHTMLAttributeValue,com.helger.xml.microdom.IHasAttributeValue,Serializable
@Immutable public class HC_Target extends Object implements IHCHasHTMLAttributeValue
Represents the value of the "target" attribute of an HTML <a> element- Author:
- Philip Helger
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAttrValue()static HC_TargetgetFromName(String sName, HC_Target aDefault)Try to find one of the default targets by name.static HC_TargetgetFromName(String sName, Function<String,? extends HC_Target> aDefaultSupplier)Try to find one of the default targets by name.StringgetName()StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.helger.html.hc.html.IHCHasHTMLAttributeValue
hasAttrValue
-
-
-
-
Method Detail
-
getAttrValue
@Nonnull @Nonempty public final String getAttrValue()
- Specified by:
getAttrValuein interfacecom.helger.xml.microdom.IHasAttributeValue
-
getFromName
@Nullable public static HC_Target getFromName(@Nonnull String sName, @Nullable HC_Target aDefault)
Try to find one of the default targets by name. The name comparison is performed case insensitive.- Parameters:
sName- The name to check. May not benull.aDefault- The default value to be returned in case the name was never found. May benull.- Returns:
- The constant link target representing the name or the default
value. May be
nullif the passed default value isnulland the name was not found.
-
getFromName
@Nullable public static HC_Target getFromName(@Nonnull String sName, @Nonnull Function<String,? extends HC_Target> aDefaultSupplier)
Try to find one of the default targets by name. The name comparison is performed case insensitive.- Parameters:
sName- The name to check. May not benull.aDefaultSupplier- The supplier to be invoked in case the name was never found. May not benullbut may return anullvalue.- Returns:
- The constant link target representing the name or the default
value. May be
nullif the passed supplier returns null. - Since:
- 8.2.6
-
-