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

com.ecfeed.core.generators.DimensionedItem Maven / Gradle / Ivy

Go to download

An open library used to connect to the ecFeed service. It can be also used as a standalone testing tool. It is integrated with Junit5 and generates a stream of test cases using a selected algorithm (e.g. Cartesian, N-Wise). There are no limitations associated with the off-line version but the user cannot access the on-line computation servers and the model database.

The newest version!
/*******************************************************************************
 *
 * Copyright (c) 2016 ecFeed AS.                                                
 * All rights reserved. This program and the accompanying materials              
 * are made available under the terms of the Eclipse Public License v1.0         
 * which accompanies this distribution, and is available at                      
 * http://www.eclipse.org/legal/epl-v10.html 
 *  
 *******************************************************************************/
package com.ecfeed.core.generators;


public class DimensionedItem {
	
	protected int fDimension; // e.g. index of method parameter
	protected E fItem;

	public DimensionedItem(int dimension, E item) {
		fDimension = dimension;
		fItem = item;
	}

	@Override
	public boolean equals(Object obj) {

		if (!(obj instanceof DimensionedItem))
			return false;

		DimensionedItem var = (DimensionedItem) obj;

		if (var.fDimension == this.fDimension && this.fItem.equals(var.fItem)) {
			return true;
		}

		return false;
	}

	@Override
	public String toString() {
		StringBuilder sb = new StringBuilder();

		sb.append("dim:");
		sb.append(fDimension);
		sb.append(", item:");
		sb.append(fItem);
		//sb.append("]");

		return sb.toString();
	}
	
	public int getDimension() {
		return fDimension;
	}
	
	public E getItem() {
		return fItem;
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy