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

com.neotys.neoload.model.readers.loadrunner.Item Maven / Gradle / Ivy

package com.neotys.neoload.model.readers.loadrunner;

import java.util.ArrayList;
import java.util.List;
import java.util.Optional;

public class Item {

    private List attributes;

    public Item() {
        attributes = new ArrayList<>();
    }

    public static Item of(List attributes) {
        Item item = new Item();
        item.getAttributes().addAll(attributes);
        return item;
    }

    public List getAttributes() {
        return attributes;
    }

    Optional getAttribute(String name) {
        return attributes.stream().filter(s -> s.toLowerCase().startsWith(name.toLowerCase()+"=")).map(s -> s.substring((name+"=").length())).findFirst();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy