// Path: xm-lep-api/src/main/java/com/icthh/xm/lep/api/CompositeLepResource.java
// public interface CompositeLepResource extends LepResource {
// 
//     List<LepResource> getChildren();
// 
// }
// 
// Path: xm-lep-api/src/main/java/com/icthh/xm/lep/api/LepResource.java
// public interface LepResource {
// 
//     /**
//      * Composite class constant.
//      */
//     Class<CompositeLepResource> COMPOSITE_CLASS = CompositeLepResource.class;
// 
//     LepResourceDescriptor getDescriptor();
// 
//     <V> V getValue(Class<? extends V> valueClass);
// 
//     default boolean isComposite() {
//         return COMPOSITE_CLASS.isInstance(this);
//     }
// 
//     /**
//      * Check is composite implementation and if so cast or throw exception otherwise.
//      *
//      * @return composite class representation of resource
//      */
//     default CompositeLepResource asComposite() {
//         if (isComposite()) {
//             return COMPOSITE_CLASS.cast(this);
//         } else {
//             throw new IllegalStateException("Can't cast not composite: "
//                                                 + this.getClass().getSimpleName()
//                                                 + " object to composite: "
//                                                 + COMPOSITE_CLASS.getSimpleName());
//         }
//     }
// 
// }
// 
// Path: xm-lep-api/src/main/java/com/icthh/xm/lep/api/LepResourceDescriptor.java
// public interface LepResourceDescriptor {
// 
//     /**
//      * Composite class constant.
//      */
//     Class<CompositeLepResourceDescriptor> COMPOSITE_CLASS = CompositeLepResourceDescriptor.class;
// 
//     LepResourceType getType();
// 
//     LepResourceType getSubType();
// 
//     LepResourceKey getKey();
// 
//     Instant getCreationTime();
// 
//     Instant getModificationTime();
// 
//     Version getVersion();
// 
//     default boolean isComposite() {
//         return COMPOSITE_CLASS.isInstance(this);
//     }
// 
//     /**
//      * Check is composite implementation and if so cast or throw exception otherwise.
//      *
//      * @return composite class representation of resource descriptor
//      */
//     default CompositeLepResourceDescriptor asComposite() {
//         if (isComposite()) {
//             return COMPOSITE_CLASS.cast(this);
//         } else {
//             throw new IllegalStateException("Can't cast not composite: "
//                                                 + this.getClass().getSimpleName()
//                                                 + " object to composite: "
//                                                 + COMPOSITE_CLASS.getSimpleName());
//         }
//     }
// 
// }


import com.icthh.xm.lep.api.CompositeLepResource;
import com.icthh.xm.lep.api.LepResource;
import com.icthh.xm.lep.api.LepResourceDescriptor;
import java.util.List;
import java.util.Objects;
package com.icthh.xm.lep.script;



/**
 * The {@link CompositeGroupLepResource} class.
 */
public class CompositeGroupLepResource implements CompositeLepResource {

    private LepResourceDescriptor descriptor;

    private List<LepResource> children;

    public CompositeGroupLepResource(LepResourceDescriptor descriptor,
                                     List<LepResource> children) {
        this.descriptor = Objects.requireNonNull(descriptor, "descriptor can't be null");
        this.children = children;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public LepResourceDescriptor getDescriptor() {
        return descriptor;
    }

    /**
     * {@inheritDoc}
     */
    @Override
// Path: xm-lep-api/src/main/java/com/icthh/xm/lep/api/CompositeLepResource.java
// public interface CompositeLepResource extends LepResource {
// 
//     List<LepResource> getChildren();
// 
// }
// 
// Path: xm-lep-api/src/main/java/com/icthh/xm/lep/api/LepResource.java
// public interface LepResource {
// 
//     /**
//      * Composite class constant.
//      */
//     Class<CompositeLepResource> COMPOSITE_CLASS = CompositeLepResource.class;
// 
//     LepResourceDescriptor getDescriptor();
// 
//     <V> V getValue(Class<? extends V> valueClass);
// 
//     default boolean isComposite() {
//         return COMPOSITE_CLASS.isInstance(this);
//     }
// 
//     /**
//      * Check is composite implementation and if so cast or throw exception otherwise.
//      *
//      * @return composite class representation of resource
//      */
//     default CompositeLepResource asComposite() {
//         if (isComposite()) {
//             return COMPOSITE_CLASS.cast(this);
//         } else {
//             throw new IllegalStateException("Can't cast not composite: "
//                                                 + this.getClass().getSimpleName()
//                                                 + " object to composite: "
//                                                 + COMPOSITE_CLASS.getSimpleName());
//         }
//     }
// 
// }
// 
// Path: xm-lep-api/src/main/java/com/icthh/xm/lep/api/LepResourceDescriptor.java
// public interface LepResourceDescriptor {
// 
//     /**
//      * Composite class constant.
//      */
//     Class<CompositeLepResourceDescriptor> COMPOSITE_CLASS = CompositeLepResourceDescriptor.class;
// 
//     LepResourceType getType();
// 
//     LepResourceType getSubType();
// 
//     LepResourceKey getKey();
// 
//     Instant getCreationTime();
// 
//     Instant getModificationTime();
// 
//     Version getVersion();
// 
//     default boolean isComposite() {
//         return COMPOSITE_CLASS.isInstance(this);
//     }
// 
//     /**
//      * Check is composite implementation and if so cast or throw exception otherwise.
//      *
//      * @return composite class representation of resource descriptor
//      */
//     default CompositeLepResourceDescriptor asComposite() {
//         if (isComposite()) {
//             return COMPOSITE_CLASS.cast(this);
//         } else {
//             throw new IllegalStateException("Can't cast not composite: "
//                                                 + this.getClass().getSimpleName()
//                                                 + " object to composite: "
//                                                 + COMPOSITE_CLASS.getSimpleName());
//         }
//     }
// 
// }


// Path: xm-lep-script/src/main/java/com/icthh/xm/lep/script/CompositeGroupLepResource.java
import com.icthh.xm.lep.api.CompositeLepResource;
import com.icthh.xm.lep.api.LepResource;
import com.icthh.xm.lep.api.LepResourceDescriptor;
import java.util.List;
import java.util.Objects;

package com.icthh.xm.lep.script;



/**
 * The {@link CompositeGroupLepResource} class.
 */
public class CompositeGroupLepResource implements CompositeLepResource {

    private LepResourceDescriptor descriptor;

    private List<LepResource> children;

    public CompositeGroupLepResource(LepResourceDescriptor descriptor,
                                     List<LepResource> children) {
        this.descriptor = Objects.requireNonNull(descriptor, "descriptor can't be null");
        this.children = children;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public LepResourceDescriptor getDescriptor() {
        return descriptor;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public <V> V getValue(Class<? extends V> valueClass) {