src/main/java/org/xmlet/xsdparser/xsdelements/XsdAbstractElement.java
public void replaceUnsolvedElements(NamedConcreteElement element){
        List<ReferenceBase> elements = this.getElements();

        if (elements != null){
            elements.stream()
                .filter(referenceBase -> referenceBase instanceof UnsolvedReference)
                .map(referenceBase -> (UnsolvedReference) referenceBase)
                .filter(unsolvedReference -> unsolvedReference.getRef().equals(element.getName()))
                .findFirst()
                .ifPresent(oldElement -> elements.set(elements.indexOf(oldElement), element));
        }
    }
public void replaceUnsolvedElements(NamedConcreteElement element){
        List<ReferenceBase> elements = this.getElements();

        if (elements != null){
            elements.stream()
                .filter(referenceBase -> referenceBase instanceof UnsolvedReference)
                .map(referenceBase -> (UnsolvedReference) referenceBase)
                .filter(unsolvedReference -> unsolvedReference.getRef().equals(element.getName()))
                .findFirst()
                .ifPresent(oldElement -> elements.set(elements.indexOf(oldElement), element));
        }
    }
public void replaceUnsolvedElements ( NamedConcreteElement element ) { List < ReferenceBase > elements = this . getElements ( ) ; if ( elements != null ) { elements . stream ( ) . filter ( referenceBase -> referenceBase instanceof UnsolvedReference ) . map ( referenceBase -> ( UnsolvedReference ) referenceBase ) . filter ( unsolvedReference -> unsolvedReference . getRef ( ) . equals ( element . getName ( ) ) ) . findFirst ( ) . ifPresent ( oldElement -> elements . set ( elements . indexOf ( oldElement ) , element ) ) ; } }
This method iterates on the current element children and replaces any {@link UnsolvedReference} object that has a
ref attribute that matches the receiving {@link NamedConcreteElement} name attribute.
@param element A fully parsed element with a name that will replace an {@link UnsolvedReference} object, if a
match between the {@link NamedConcreteElement} name attribute and the {@link UnsolvedReference}
ref attribute.
This method iterates on the current element children and replaces any {