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

net.java.trueupdate.util.builder.AbstractBuilder Maven / Gradle / Ivy

There is a newer version: 0.8.1
Show newest version
/*
 * Copyright (C) 2013 Schlichtherle IT Services & Stimulus Software.
 * All rights reserved. Use is subject to license terms.
 */
package net.java.trueupdate.util.builder;

/**
 * An abstract builder.
 * Note that builders are not thread-safe.
 *
 * @param 

The type of the parent builder, if defined. * @author Christian Schlichtherle */ public abstract class AbstractBuilder

{ /** * Builds and returns a new product. * A call to this method does not alter the state of this builder, * so a client can continue to use it in order to build another product. */ public abstract Object build(); /** * Optional operation: Injects a new product into the parent builder, * if defined. * * @throws UnsupportedOperationException if this builder does not have a * parent builder. */ public P inject() { throw new UnsupportedOperationException( "This builder does not have a parent builder."); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy