View Javadoc
1   /**
2    * Copyright (C) 2010-14 pvmanager developers. See COPYRIGHT.TXT
3    * All rights reserved. Use is subject to license terms. See LICENSE.TXT
4    */
5   package org.epics.pvmanager;
6   
7   import java.util.Collection;
8   import java.util.Objects;
9   
10  /**
11   * Represents all the values, channel names and ordering information needed
12   * for writing
13   *
14   * @author carcassi
15   */
16  public class WriteRecipe {
17      private final Collection<ChannelWriteRecipe> channelWriteRecipes;
18  
19      WriteRecipe(Collection<ChannelWriteRecipe> channelWriteRecipes) {
20          this.channelWriteRecipes = channelWriteRecipes;
21      }
22  
23      /**
24       * The channel recipes for this recipe.
25       * 
26       * @return the set of channel recipe
27       */
28      public Collection<ChannelWriteRecipe> getChannelWriteRecipes() {
29          return channelWriteRecipes;
30      }
31  
32      @Override
33      public int hashCode() {
34          int hash = 3;
35          hash = 23 * hash + Objects.hashCode(this.channelWriteRecipes);
36          return hash;
37      }
38  
39      @Override
40      public boolean equals(Object obj) {
41          if (obj == null) {
42              return false;
43          }
44          if (getClass() != obj.getClass()) {
45              return false;
46          }
47          final WriteRecipe other = (WriteRecipe) obj;
48          if (!Objects.equals(this.channelWriteRecipes, other.channelWriteRecipes)) {
49              return false;
50          }
51          return true;
52      }
53      
54  }