Changeset 94


Ignore:
Timestamp:
Apr 5, 2006, 10:20:24 AM (15 years ago)
Author:
Johan Enell
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/se/lu/onk/BaseFile/src/basefile/BASEFileSection.java

    r31 r94  
    172172    return new ArrayList<String>(Arrays.asList(s.split("\\t")));
    173173
     174  }
     175
     176  /**
     177   * Used to get the values from a header as a {@link java.util.List<Integer>}.
     178   * The order is the same as in the basefile if the user hasent changed it.
     179   *
     180   * @param name
     181   *            The name of the header
     182   * @return A list of the values.
     183   */
     184  public List<Integer> findFieldIntList(String name)
     185  {
     186    String s = headers.get(name);
     187    if (s == null) return null;
     188    ArrayList<Integer> ret = new ArrayList<Integer>();
     189    for (String assay : Arrays.asList(s.split("\\t")))
     190    {
     191      ret.add(new Integer(assay));
     192    }
     193    return ret;
    174194  }
    175195
Note: See TracChangeset for help on using the changeset viewer.