@NotThreadSafe public class CSSSelector extends Object implements ICSSWriteable, ICSSSourceLocationAware
div or .class or
h1.class or #id or
table tbody td .class etc.| Constructor and Description |
|---|
CSSSelector() |
| Modifier and Type | Method and Description |
|---|---|
CSSSelector |
addMember(ICSSSelectorMember aMember) |
CSSSelector |
addMember(int nIndex,
ICSSSelectorMember aMember) |
boolean |
equals(Object o) |
com.helger.commons.collection.impl.ICommonsList<ICSSSelectorMember> |
getAllMembers() |
String |
getAsCSSString(ICSSWriterSettings aSettings,
int nIndentLevel)
Get the contents of this object as a serialized CSS string for writing to
an output.
|
ICSSSelectorMember |
getMemberAtIndex(int nMemberIndex) |
int |
getMemberCount() |
CSSSourceLocation |
getSourceLocation() |
int |
hashCode() |
boolean |
hasMembers() |
com.helger.commons.state.EChange |
removeAllMembers()
Remove all members.
|
com.helger.commons.state.EChange |
removeMember(ICSSSelectorMember aMember) |
com.helger.commons.state.EChange |
removeMember(int nMemberIndex) |
void |
setSourceLocation(CSSSourceLocation aSourceLocation)
Set the source location of the object, determined while parsing.
|
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitgetAsCSSString, getAsCSSStringpublic boolean hasMembers()
@Nonnegative public int getMemberCount()
@Nonnull public CSSSelector addMember(@Nonnull ICSSSelectorMember aMember)
@Nonnull public CSSSelector addMember(@Nonnegative int nIndex, @Nonnull ICSSSelectorMember aMember)
@Nonnull public com.helger.commons.state.EChange removeMember(@Nonnull ICSSSelectorMember aMember)
@Nonnull public com.helger.commons.state.EChange removeMember(@Nonnegative int nMemberIndex)
@Nonnull public com.helger.commons.state.EChange removeAllMembers()
EChange.CHANGED if any member was removed,
EChange.UNCHANGED otherwise. Never null.@Nullable public ICSSSelectorMember getMemberAtIndex(@Nonnegative int nMemberIndex)
@Nonnull @ReturnsMutableCopy public com.helger.commons.collection.impl.ICommonsList<ICSSSelectorMember> getAllMembers()
@Nonnull public String getAsCSSString(@Nonnull ICSSWriterSettings aSettings, @Nonnegative int nIndentLevel)
ICSSWriteablegetAsCSSString in interface ICSSWriteableaSettings - The settings to be used to format the output. May not be
null.nIndentLevel - The current indentation levelnull.public void setSourceLocation(@Nullable CSSSourceLocation aSourceLocation)
ICSSSourceLocationAwaresetSourceLocation in interface ICSSSourceLocationAwareaSourceLocation - The source location to use. May be null.@Nullable public CSSSourceLocation getSourceLocation()
getSourceLocation in interface ICSSSourceLocationAwarenull if an object was not read but manually
created.Copyright © 2014–2018 Philip Helger. All rights reserved.