Package org.hornetq.api.core

Examples of org.hornetq.api.core.SimpleString.subSequence()


         // OK
      }

      Assert.assertEquals(s.length(), s1.length());

      CharSequence ss = s1.subSequence(0, s1.length());

      Assert.assertEquals(ss, s1);

      ss = s1.subSequence(1, 4);
      Assert.assertEquals(ss, new SimpleString("bcd"));
View Full Code Here


      CharSequence ss = s1.subSequence(0, s1.length());

      Assert.assertEquals(ss, s1);

      ss = s1.subSequence(1, 4);
      Assert.assertEquals(ss, new SimpleString("bcd"));

      ss = s1.subSequence(5, 10);
      Assert.assertEquals(ss, new SimpleString("fghij"));
View Full Code Here

      Assert.assertEquals(ss, s1);

      ss = s1.subSequence(1, 4);
      Assert.assertEquals(ss, new SimpleString("bcd"));

      ss = s1.subSequence(5, 10);
      Assert.assertEquals(ss, new SimpleString("fghij"));

      ss = s1.subSequence(5, 12);
      Assert.assertEquals(ss, new SimpleString("fghijkl"));
View Full Code Here

      Assert.assertEquals(ss, new SimpleString("bcd"));

      ss = s1.subSequence(5, 10);
      Assert.assertEquals(ss, new SimpleString("fghij"));

      ss = s1.subSequence(5, 12);
      Assert.assertEquals(ss, new SimpleString("fghijkl"));

      try
      {
         s1.subSequence(-1, 2);
View Full Code Here

      ss = s1.subSequence(5, 12);
      Assert.assertEquals(ss, new SimpleString("fghijkl"));

      try
      {
         s1.subSequence(-1, 2);
         Assert.fail("Should throw exception");
      }
      catch (IndexOutOfBoundsException e)
      {
         // OK
View Full Code Here

         // OK
      }

      try
      {
         s1.subSequence(-4, -2);
         Assert.fail("Should throw exception");
      }
      catch (IndexOutOfBoundsException e)
      {
         // OK
View Full Code Here

         // OK
      }

      try
      {
         s1.subSequence(0, s1.length() + 1);
         Assert.fail("Should throw exception");
      }
      catch (IndexOutOfBoundsException e)
      {
         // OK
View Full Code Here

         // OK
      }

      try
      {
         s1.subSequence(0, s1.length() + 2);
         Assert.fail("Should throw exception");
      }
      catch (IndexOutOfBoundsException e)
      {
         // OK
View Full Code Here

         // OK
      }

      try
      {
         s1.subSequence(5, 1);
         Assert.fail("Should throw exception");
      }
      catch (IndexOutOfBoundsException e)
      {
         // OK
View Full Code Here

         // OK
      }

      Assert.assertEquals(s.length(), s1.length());

      CharSequence ss = s1.subSequence(0, s1.length());

      Assert.assertEquals(ss, s1);

      ss = s1.subSequence(1, 4);
      Assert.assertEquals(ss, new SimpleString("bcd"));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.