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

se.jbee.inject.Emergence Maven / Gradle / Ivy

There is a newer version: 0.6
Show newest version
/*
 *  Copyright (c) 2012, Jan Bernitt 
 *			
 *  Licensed under the Apache License, Version 2.0, http://www.apache.org/licenses/LICENSE-2.0
 */
package se.jbee.inject;

/**
 * A description of an {@link Instance} together with its duration of life ({@link Expiry}).
 * 
 * @author Jan Bernitt ([email protected])
 * 
 * @param 
 *            The type of the instance
 */
public final class Emergence {

	public static  Emergence emergence( Instance instance, Expiry expiry ) {
		return new Emergence( instance, expiry );
	}

	private final Instance instance;
	private final Expiry expiry;

	private Emergence( Instance instance, Expiry expiry ) {
		super();
		this.instance = instance;
		this.expiry = expiry;
	}

	public Instance getInstance() {
		return instance;
	}

	public Expiry getExpiry() {
		return expiry;
	}

	@Override
	public String toString() {
		return expiry + " " + instance;
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy