Skip to content

Commit

Permalink
simplify AbstractList (step 14)
Browse files Browse the repository at this point in the history
  • Loading branch information
rbri committed Apr 20, 2022
1 parent 2c33970 commit ae89c0c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,27 +97,6 @@ public enum EffectOnCache {
public AbstractList() {
}

/**
* Creates an instance.
*
* @param domeNode the {@link DomNode}
* @param attributeChangeSensitive indicates if the content of the collection may change when an attribute
* of a descendant node of parentScope changes (attribute added, modified or removed)
*/
public AbstractList(final DomNode domeNode, final boolean attributeChangeSensitive) {
this(domeNode, attributeChangeSensitive, null);
}

/**
* Creates an instance with an initial cache value.
*
* @param domNode the {@link DomNode}
* @param initialElements the initial content for the cache
*/
protected AbstractList(final DomNode domNode, final List<DomNode> initialElements) {
this(domNode, true, new ArrayList<>(initialElements));
}

/**
* Creates an instance.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public NodeList() {
* of a descendant node of parentScope changes (attribute added, modified or removed)
*/
public NodeList(final DomNode domNode, final boolean attributeChangeSensitive) {
super(domNode, attributeChangeSensitive);
super(domNode, attributeChangeSensitive, null);
}

/**
Expand All @@ -84,7 +84,7 @@ public NodeList(final DomNode domNode, final boolean attributeChangeSensitive) {
* @param initialElements the initial content for the cache
*/
public NodeList(final DomNode domNode, final List<DomNode> initialElements) {
super(domNode, initialElements);
super(domNode, true, new ArrayList<>(initialElements));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public HTMLCollection() {
* of a descendant node of parentScope changes (attribute added, modified or removed)
*/
public HTMLCollection(final DomNode domNode, final boolean attributeChangeSensitive) {
super(domNode, attributeChangeSensitive);
super(domNode, attributeChangeSensitive, null);
}

/**
Expand All @@ -90,7 +90,7 @@ public HTMLCollection(final DomNode domNode, final boolean attributeChangeSensit
* @param initialElements the initial content for the cache
*/
HTMLCollection(final DomNode domNode, final List<DomNode> initialElements) {
super(domNode, initialElements);
super(domNode, true, new ArrayList<>(initialElements));
}

private HTMLCollection(final DomNode domNode, final boolean attributeChangeSensitive,
Expand Down

0 comments on commit ae89c0c

Please # to comment.