public class SwiftTreeBlockSequence extends SwiftTreeBlockElement
Constructor and Description |
---|
SwiftTreeBlockSequence() |
SwiftTreeBlockSequence(java.util.List<SwiftTreeBlockElement> elements) |
SwiftTreeBlockSequence(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.util.List<SwiftTreeBlockElement> |
getElements() |
Tag |
getFirstTag()
Returns the first Tag element of this sequence, or
null if sequence does not contain any tag element |
java.lang.String |
getName() |
java.util.List<SwiftTreeBlockSequence> |
getSubSequences(java.lang.String name)
Returns all inner sequences (first descendant of this sequence) with the given parameter name.
|
Tag |
getTagByName(java.lang.String name)
Performs a search in this sequence returning the first tag that matches the parameter name.
|
Tag |
getTagByNumber(int number)
Performs a search in this sequence returning the first tag that matches the parameter number.
|
java.util.List<Tag> |
getTagsByName(java.lang.String name)
Get all tags with the given name.
|
java.util.List<Tag> |
getTagsByName(java.lang.String name,
java.lang.String content)
Get all tags with the given name and containing the parameter string
|
java.util.List<Tag> |
getTagsByNumber(int number)
Performs a search in this sequence returning all tag occurrences tag that matches the parameter number.
|
boolean |
getTagsByNumberContains(int number,
java.lang.String... values)
return true if any of the tags in this list with the given number contains any of the given values
|
SwiftTreeBlockTag |
getTreeBlockTagByNumber(int number)
Performs a search in this sequence returning the first tag that matches the parameter number.
|
java.util.List<SwiftTreeBlockTag> |
getTreeBlockTagsByName(java.lang.String name)
Get all tags with the given name.
|
java.util.List<SwiftTreeBlockTag> |
getTreeBlockTagsByNumber(int number)
Performs a search in this sequence returning all tag occurrences tag that matches the parameter number.
|
int |
hashCode() |
void |
setElements(java.util.List<SwiftTreeBlockElement> elements) |
void |
setName(java.lang.String name) |
isSequence, isTag
public SwiftTreeBlockSequence()
public SwiftTreeBlockSequence(java.util.List<SwiftTreeBlockElement> elements)
public SwiftTreeBlockSequence(java.lang.String name)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.util.List<SwiftTreeBlockElement> getElements()
public Tag getFirstTag()
null
if sequence does not contain any tag elementpublic java.lang.String getName()
public java.util.List<SwiftTreeBlockSequence> getSubSequences(java.lang.String name)
name
- name of the sequences to findpublic Tag getTagByName(java.lang.String name)
name
- name of the tag to findnull
if not foundpublic Tag getTagByNumber(int number)
number
- number of the tag name to findnull
if not foundpublic java.util.List<Tag> getTagsByName(java.lang.String name)
name
- public java.util.List<Tag> getTagsByName(java.lang.String name, java.lang.String content)
name
- name of the tag to searchcontent
- optional content of tags to find using String.containspublic java.util.List<Tag> getTagsByNumber(int number)
number
- number of the tag name to findpublic boolean getTagsByNumberContains(int number, java.lang.String... values)
number
- values
- public SwiftTreeBlockTag getTreeBlockTagByNumber(int number)
number
- number of the tag name to findnull
if not foundpublic java.util.List<SwiftTreeBlockTag> getTreeBlockTagsByName(java.lang.String name)
name
- public java.util.List<SwiftTreeBlockTag> getTreeBlockTagsByNumber(int number)
number
- number of the tag name to findpublic int hashCode()
hashCode
in class java.lang.Object
public void setElements(java.util.List<SwiftTreeBlockElement> elements)
public void setName(java.lang.String name)
name
- the name to set