JAL-98 with the two types missing from last commit Profiles[I] !
[jalview.git] / src / jalview / datamodel / Profiles.java
1 package jalview.datamodel;
2
3 public class Profiles implements ProfilesI
4 {
5
6   private ProfileI[] profiles;
7
8   public Profiles(ProfileI[] p)
9   {
10     profiles = p;
11   }
12
13   /**
14    * Returns the profile for the given column, or null if none found
15    * 
16    * @param col
17    */
18   @Override
19   public ProfileI get(int col)
20   {
21     return profiles != null && col >= 0 && col < profiles.length ? profiles[col]
22             : null;
23   }
24
25   /**
26    * Returns the first column (base 0) covered by the profiles
27    */
28   @Override
29   public int getStartColumn()
30   {
31     return 0;
32   }
33
34   /**
35    * Returns the last column (base 0) covered by the profiles
36    */
37   @Override
38   public int getEndColumn()
39   {
40     return profiles == null ? 0 : profiles.length - 1;
41   }
42
43 }