All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.matheusesoft.alm.api.model.Entities Maven / Gradle / Ivy

The newest version!
package com.github.matheusesoft.alm.api.model;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElementRef;
import javax.xml.bind.annotation.XmlElementRefs;
import javax.xml.bind.annotation.XmlRootElement;

@XmlRootElement(name = "Entities")
@XmlAccessorType(XmlAccessType.FIELD)
public class Entities
{
    @XmlElementRefs({
    @XmlElementRef(name="Entity", type=TestInstance.class),
    @XmlElementRef(name="Entity", type=RunStep.class)})
    private List entities;

    public Entities()
    {
        this(new ArrayList());
    }

    public Entities(Collection entities)
    {
        if (entities instanceof List)
        {
            this.entities = (List) entities;
        }
        else
        {
            this.entities = new ArrayList(entities);
        }
    }

    public List entities()
    {
        return entities;
    }

    public void entities(List entities)
    {
        this.entities = entities;
    }

    public void addEntity(T entity)
    {
        entities.add(entity);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy