Examples of subSequence()


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

      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

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

         // OK
      }

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

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

         // OK
      }

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

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

         // OK
      }

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

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

         // OK
      }

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

Examples of org.jruby.util.ByteList.subSequence()

            final ByteList bytes = string.getBytes();

            if (normalisedIndex < 0 || normalisedIndex + 1 >= bytes.length()) {
                throw new UnexpectedResultException(getContext().getCoreLibrary().getNilObject());
            } else {
                return new RubyString(getContext().getCoreLibrary().getStringClass(), (ByteList) bytes.subSequence(index, index + 1));
            }
        }

        @Specialization(contains = "getIndexInBounds")
        public Object getIndex(RubyString string, int index, UndefinedPlaceholder undefined) {
View Full Code Here

Examples of org.pdf4j.saxon.om.FastStringBuffer.subSequence()

            dumpDataStructure();
            throw new NullPointerException("startSegment: subSequence(" + start + ", " + end + ")");
        }
        if (seg0 == seg1) {
            // the required substring is all in one segment
            return startSegment.subSequence(offset0, offset1);
        } else {
            // copy the data into a new FastStringBuffer. This case should be exceptional
            FastStringBuffer sb = new FastStringBuffer(end - start);
            sb.append(startSegment.subSequence(offset0, startSegment.length()));
            for (int i=seg0+1; i<seg1; i++) {
View Full Code Here

Examples of org.semanticweb.owlapi.apibinding.OWLFunctionalSyntaxFactory.IRI.subSequence()

    public void testSubSequence() {
        String str = "http://owlapi.sourceforge.net#ABC";
        IRI iri = IRI(str);
        for (int i = 0; i < str.length(); i++) {
            for (int j = i; j < str.length(); j++) {
                assertEquals(str.subSequence(i, j), iri.subSequence(i, j));
            }
        }
    }

    @Test
View Full Code Here

Examples of org.semanticweb.owlapi.model.IRI.subSequence()

    public void testSubSequence() {
        String str = "http://owlapi.sourceforge.net#ABC";
        IRI iri = IRI(str);
        for (int i = 0; i < str.length(); i++) {
            for (int j = i; j < str.length(); j++) {
                assertEquals(str.subSequence(i, j), iri.subSequence(i, j));
            }
        }
    }

    @Test
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.