title: How do you get AttributedCharacterIterator to return a run for a given Attribute?
body: <p>Suppose you assign a custom <code>CharacterIterator.Attribute</code> to the first five characters of a ten-character string.</p>
  
  <p>Suppose further you assign a <em>different</em> <code>CharacterIterator.Attribute</code> to the remaining characters.</p>
  
  <p>Why then, when I call <code>AttributedString.getRunStart(firstAttribute)</code> do I get 0 (I expect this) and when I call <code>AttributedString.getRunStart(secondAttribute)</code> do I <em>also</em> get 0?</p>
  
  <p>Here's my setup code:</p>
  
  <pre><code>final AttributedString s = new AttributedString("SQ3R9FFFFF");
  final Attribute baseID = new Attribute("Base ID") {};
  final Attribute fs = new Attribute("FFF") {};
  s.addAttribute(baseID, "Ignored", 0, 5);
  s.addAttribute(fs, "Whatever", 5, 10);
  final AttributedCharacterIterator iterator = s.getIterator();
  assertNotNull(iterator);
  </code></pre>
  
  <p>And now here's some code that outputs some diagnostics:</p>
  
  <pre><code>for (char c = iterator.first(); c != DONE; c = iterator.next()) {
    System.out.println("Character: " + c);
    System.out.println("Character index: " + iterator.getIndex());
    System.out.println("Attributes: " + iterator.getAttributes());
    System.out.println("Start for baseID: " + iterator.getRunStart(baseID));
    System.out.println("Limit for baseID: " + iterator.getRunLimit(baseID));
    System.out.println("Start for fs: " + iterator.getRunStart(fs));
    System.out.println("Limit for fs: " + iterator.getRunLimit(fs));
  }
  </code></pre>
  
  <p>The output is this:</p>
  
  <pre><code> Character: S
   Character index: 0
   Attributes: {com.foobar.collection.api.TestCaseAttributedString$1(Base ID)=Ignored}
   Start for baseID: 0
   Limit for baseID: 5
   Start for fs: 0
   Limit for fs: 5
   Character: Q
   Character index: 1
   Attributes: {com.foobar.collection.api.TestCaseAttributedString$1(Base ID)=Ignored}
   Start for baseID: 0
   Limit for baseID: 5
   Start for fs: 0
   Limit for fs: 5
   Character: 3
   Character index: 2
   Attributes: {com.foobar.collection.api.TestCaseAttributedString$1(Base ID)=Ignored}
   Start for baseID: 0
   Limit for baseID: 5
   Start for fs: 0
   Limit for fs: 5
   Character: R
   Character index: 3
   Attributes: {com.foobar.collection.api.TestCaseAttributedString$1(Base ID)=Ignored}
   Start for baseID: 0
   Limit for baseID: 5
   Start for fs: 0
   Limit for fs: 5
   Character: 9
   Character index: 4
   Attributes: {com.foobar.collection.api.TestCaseAttributedString$1(Base ID)=Ignored}
   Start for baseID: 0
   Limit for baseID: 5
   Start for fs: 0
   Limit for fs: 5
   Character: F
   Character index: 5
   Attributes: {com.foobar.collection.api.TestCaseAttributedString$2(FFF)=Whatever}
   Start for baseID: 5
   Limit for baseID: 10
   Start for fs: 5
   Limit for fs: 10
   Character: F
   Character index: 6
   Attributes: {com.foobar.collection.api.TestCaseAttributedString$2(FFF)=Whatever}
   Start for baseID: 5
   Limit for baseID: 10
   Start for fs: 5
   Limit for fs: 10
   Character: F
   Character index: 7
   Attributes: {com.foobar.collection.api.TestCaseAttributedString$2(FFF)=Whatever}
   Start for baseID: 5
   Limit for baseID: 10
   Start for fs: 5
   Limit for fs: 10
   Character: F
   Character index: 8
   Attributes: {com.foobar.collection.api.TestCaseAttributedString$2(FFF)=Whatever}
   Start for baseID: 5
   Limit for baseID: 10
   Start for fs: 5
   Limit for fs: 10
   Character: F
   Character index: 9
   Attributes: {com.foobar.collection.api.TestCaseAttributedString$2(FFF)=Whatever}
   Start for baseID: 5
   Limit for baseID: 10
   Start for fs: 5
   Limit for fs: 10
  </code></pre>
  
  <p>Note, in particular, the last entry, which reports that the "Start" for "baseID" is 5.  Huh?</p>