X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fbinding%2FSequenceSet.java;h=59151c830c4aed85440c07747c66f6cae4f4fe3a;hb=aced09c4feeaf3406269442c14e54abeeb4cad81;hp=85b48897bfa113def16c9c0036c94c1bf2750740;hpb=5d32c7ad007e098894b332b6fca61e1824972c50;p=jalview.git diff --git a/src/jalview/binding/SequenceSet.java b/src/jalview/binding/SequenceSet.java index 85b4889..59151c8 100644 --- a/src/jalview/binding/SequenceSet.java +++ b/src/jalview/binding/SequenceSet.java @@ -24,6 +24,8 @@ package jalview.binding; //- Imported classes and packages -/ //---------------------------------/ +import jalview.util.MessageManager; + import org.exolab.castor.xml.Marshaller; import org.exolab.castor.xml.Unmarshaller; @@ -186,9 +188,11 @@ public class SequenceSet implements java.io.Serializable // check bounds for index if (index < 0 || index >= this._annotationList.size()) { - throw new IndexOutOfBoundsException("getAnnotation: Index value '" - + index + "' not in range [0.." - + (this._annotationList.size() - 1) + "]"); + throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{ + "getAnnotation", + Integer.valueOf(index).toString(), + Integer.valueOf((this._annotationList.size() - 1)).toString() + })); } return (jalview.binding.Annotation) _annotationList.get(index); @@ -244,9 +248,11 @@ public class SequenceSet implements java.io.Serializable // check bounds for index if (index < 0 || index >= this._sequenceList.size()) { - throw new IndexOutOfBoundsException("getSequence: Index value '" - + index + "' not in range [0.." - + (this._sequenceList.size() - 1) + "]"); + throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{ + "getSequence", + Integer.valueOf(index).toString(), + Integer.valueOf((this._sequenceList.size() - 1)).toString() + })); } return (jalview.binding.Sequence) _sequenceList.get(index); @@ -441,9 +447,11 @@ public class SequenceSet implements java.io.Serializable // check bounds for index if (index < 0 || index >= this._annotationList.size()) { - throw new IndexOutOfBoundsException("setAnnotation: Index value '" - + index + "' not in range [0.." - + (this._annotationList.size() - 1) + "]"); + throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{ + "setAnnotation", + Integer.valueOf(index).toString(), + Integer.valueOf((this._annotationList.size() - 1)).toString() + })); } this._annotationList.set(index, vAnnotation); @@ -492,9 +500,11 @@ public class SequenceSet implements java.io.Serializable // check bounds for index if (index < 0 || index >= this._sequenceList.size()) { - throw new IndexOutOfBoundsException("setSequence: Index value '" - + index + "' not in range [0.." - + (this._sequenceList.size() - 1) + "]"); + throw new IndexOutOfBoundsException(MessageManager.formatMessage("exception.index_value_not_in_range", new String[]{ + "setSequence", + Integer.valueOf(index).toString(), + Integer.valueOf((this._sequenceList.size() - 1)).toString() + })); } this._sequenceList.set(index, vSequence);