001/**
002 * SealedRealDomain.java
003 *
004 * Copyright (c) 2004-2012, Nicole C. Tedesco.  All rights reserved.
005 *
006 * Licensed under the Apache License, Version 2.0 (the "License");
007 * you may not use this file except in compliance with the License.
008 * You may obtain a copy of the License at:
009 *
010 * http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing, software
013 * distributed under the License is distributed on an "AS IS" BASIS,
014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015 * See the License for the specific language governing permissions and
016 * limitations under the License.
017 */
018
019package net.sf.jaccumulator.reals;
020
021import java.util.NoSuchElementException;
022
023import net.sf.jaccumulator.AlgebraicStructure;
024import net.sf.jaccumulator.scalars.SealedScalarDomain;
025
026/**
027 * A read-only contract for an {@link AlgebraicStructure algebraic} structure
028 * within which {@link Real reals} can be embedded
029 *
030 * @since JAccumulator 4.0
031 * @author Nicole Tedesco (<a
032 *         href="mailto:Nicole@NicoleTedesco.com">Nicole@NicoleTedesco.com</a>)
033 */
034public interface SealedRealDomain
035    extends
036        SealedScalarDomain,
037        SealedRealBag
038{
039    /**
040     * Induce the maximum domain value into the target
041     *
042     * @param <R>
043     *        the target type
044     * @param aTarget
045     *        a target into which this domain's maximum value will be induced
046     * @return the target
047     * @throws UnsupportedOperationException
048     *         this target primitive cannot be changed
049     * @throws IllegalStateException
050     *         this target primitive cannot be changed at this time
051     * @throws NullPointerException
052     *         a {@code null} value was provided when none was expected
053     * @throws NoSuchElementException
054     *         an expected parameter was not found in the parameter source
055     */
056    public <R extends Real<?>> R induceRealMaximum( final R aTarget )
057        throws NullPointerException,
058            NoSuchElementException,
059            UnsupportedOperationException,
060            IllegalStateException;
061
062    /**
063     * Induce the minimum domain value into the target
064     *
065     * @param <R>
066     *        the target type
067     * @param aTarget
068     *        a target into which this domain's minimum value will be induced
069     * @return the target
070     * @throws UnsupportedOperationException
071     *         this target primitive cannot be changed
072     * @throws IllegalStateException
073     *         this target primitive cannot be changed at this time
074     * @throws NullPointerException
075     *         a {@code null} value was provided when none was expected
076     * @throws NoSuchElementException
077     *         an expected parameter was not found in the parameter source
078     */
079    public <R extends Real<?>> R induceRealMinimum( final R aTarget )
080        throws NullPointerException,
081            NoSuchElementException,
082            UnsupportedOperationException,
083            IllegalStateException;
084}