@NotThreadSafe public class CSSURI extends Object implements ICSSWriteable, ICSSSourceLocationAware
setURI(String)
.Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
String |
getAsCSSString(ICSSWriterSettings aSettings,
int nIndentLevel)
Get the contents of this object as a serialized CSS string for writing to
an output.
|
CSSDataURL |
getAsDataURL()
Try to convert the contained URI to a Data URL object.
|
CSSSourceLocation |
getSourceLocation() |
String |
getURI() |
int |
hashCode() |
boolean |
isDataURL()
Check if this URI is a data URL (starting with "data:")
|
void |
setSourceLocation(CSSSourceLocation aSourceLocation)
Set the source location of the object, determined while parsing.
|
CSSURI |
setURI(String sURI)
Set the URI string of this object.
|
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getAsCSSString, getAsCSSString
@Nonnull public String getURI()
@Nonnull public CSSURI setURI(@Nonnull String sURI)
sURI
- The URI to be set. May not be null
but may be empty
(even though an empty URL usually does not make sense).public boolean isDataURL()
true
if the URI is a data URL, false
otherwise.@Nullable public CSSDataURL getAsDataURL()
null
if conversion to a data URL failed, the
CSSDataURL
object otherwise.@Nonnull @Nonempty public String getAsCSSString(@Nonnull ICSSWriterSettings aSettings, @Nonnegative int nIndentLevel)
ICSSWriteable
getAsCSSString
in interface ICSSWriteable
aSettings
- The settings to be used to format the output. May not be
null
.nIndentLevel
- The current indentation levelnull
.public void setSourceLocation(@Nullable CSSSourceLocation aSourceLocation)
ICSSSourceLocationAware
setSourceLocation
in interface ICSSSourceLocationAware
aSourceLocation
- The source location to use. May be null
.@Nullable public CSSSourceLocation getSourceLocation()
getSourceLocation
in interface ICSSSourceLocationAware
null
if an object was not read but manually
created.Copyright © 2014–2021 Philip Helger. All rights reserved.