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

com.github.arachnidium.core.DestroyableObjects Maven / Gradle / Ivy

package com.github.arachnidium.core;

import java.util.ArrayList;

import com.github.arachnidium.core.interfaces.IDestroyable;

class DestroyableObjects implements IDestroyable {

	private final ArrayList destroyableList = new ArrayList();
	
	void add(IDestroyable destroyable){
		destroyableList.add(destroyable);
	}
	
	@Override
	public void destroy() {
		//removes references or does something that 
		for (IDestroyable d: destroyableList){ //kills objects refereed to WebDriver
			d.destroy(); //Uses order of adding
		}
		destroyableList.clear();
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy