2009/05/20 - Apache Shale has been retired.

For more information, please explore the Attic.

Coverage Report - org.apache.shale.dialog.basic.config.TransitionImpl
 
Classes in this File Line Coverage Branch Coverage Complexity
TransitionImpl
0%
0/10
N/A
1
 
 1  
 /*
 2  
  * Licensed to the Apache Software Foundation (ASF) under one or more
 3  
  * contributor license agreements.  See the NOTICE file distributed with
 4  
  * this work for additional information regarding copyright ownership.
 5  
  * The ASF licenses this file to you under the Apache License, Version 2.0
 6  
  * (the "License"); you may not use this file except in compliance with
 7  
  * the License.  You may obtain a copy of the License at
 8  
  *
 9  
  *      http://www.apache.org/licenses/LICENSE-2.0
 10  
  *
 11  
  * Unless required by applicable law or agreed to in writing, software
 12  
  * distributed under the License is distributed on an "AS IS" BASIS,
 13  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 14  
  * See the License for the specific language governing permissions and
 15  
  * limitations under the License.
 16  
  */
 17  
 
 18  
 package org.apache.shale.dialog.basic.config;
 19  
 
 20  
 import org.apache.shale.dialog.basic.model.Transition;
 21  
 
 22  
 /**
 23  
  * <p>{@link TransitionImpl} is a basic implementation of
 24  
  * {@link Transition}.</p>
 25  
  *
 26  
  * @since 1.0.4
 27  
  */
 28  
 
 29  0
 public final class TransitionImpl implements Transition {
 30  
 
 31  
 
 32  
     // ------------------------------------------------------ Instance Variables
 33  
 
 34  
 
 35  
     /**
 36  
      * <p>The logical outcome used to select this {@link Transition}.</p>
 37  
      */
 38  0
     private String outcome = null;
 39  
 
 40  
 
 41  
     /**
 42  
      * <p>The identifier of the target {@link State} for this
 43  
      * {@link Transition}.</p>
 44  
      */
 45  0
     private String target = null;
 46  
 
 47  
 
 48  
     // -------------------------------------------------------------- Properties
 49  
 
 50  
 
 51  
     /**
 52  
      * {@inheritDoc}
 53  
      */
 54  
     public String getOutcome() {
 55  
 
 56  0
         return this.outcome;
 57  
 
 58  
     }
 59  
 
 60  
 
 61  
     /**
 62  
      * {@inheritDoc}
 63  
      */
 64  
     public String getTarget() {
 65  
 
 66  0
         return this.target;
 67  
 
 68  
     }
 69  
 
 70  
 
 71  
     // ---------------------------------------------------------- Public Methods
 72  
 
 73  
 
 74  
     /**
 75  
      * <p>Render a printable version of this instance.</p>
 76  
      *
 77  
      * @return The printable version of this instance
 78  
      */
 79  
     public String toString() {
 80  
 
 81  0
         return "Transition[outcome=" + this.outcome +
 82  
                ",target=" + this.target + "]";
 83  
 
 84  
     }
 85  
 
 86  
 
 87  
     // --------------------------------------------------- Configuration Methods
 88  
 
 89  
 
 90  
     /**
 91  
      * <p>Set the logical outcome used to select this {@link Transition}.</p>
 92  
      *
 93  
      * @param outcome New logical outcome
 94  
      */
 95  
     public void setOutcome(String outcome) {
 96  
 
 97  0
         this.outcome = outcome;
 98  
 
 99  0
     }
 100  
 
 101  
 
 102  
     /**
 103  
      * <p>Set the target {@link State} identifier for this
 104  
      * {@link Transition}.</p>
 105  
      *
 106  
      * @param target New target identifier
 107  
      */
 108  
     public void setTarget(String target) {
 109  
 
 110  0
         this.target = target;
 111  
 
 112  0
     }
 113  
 
 114  
 
 115  
 }