001 package ps6.tigerdb; 002 003 /** 004 * TigerRwTLID.java 005 * 006 * @author Felix S. Klock II 007 */ 008 009 public class TigerRwTLID extends TigerRecord { 010 011 public static final long serialVersionUID = 4534; 012 private final int tlid; 013 014 public TigerRwTLID(String s, int size, int tlidStart) 015 throws BadRecordException { 016 super(s, size); 017 try { 018 tlid = toInt(s.substring(tlidStart,tlidStart+10)); 019 } catch (NoInt e) { 020 throw new RuntimeException(); 021 } 022 } 023 024 public TigerRwTLID(String s, int size) throws BadRecordException { 025 this(s, size, 5); 026 } 027 028 /** 029 * @return the TLID of this record 030 */ 031 public int getTLID() { 032 return tlid; 033 } 034 035 } // TigerRwTLID