Class CharArrayCharSequence

java.lang.Object
com.fluxtion.ext.streaming.api.util.CharArrayCharSequence
All Implemented Interfaces:
java.lang.CharSequence

public class CharArrayCharSequence
extends java.lang.Object
implements java.lang.CharSequence
CharSequence backed by an array. Views on the array can be accessed using subSequence(int, int) returning a CharSequence that points to the underlying char array. The view can re-point its view by calling subSequence(int, int) this will return the original view but with pointers moved to new positions on the underlying array.
Author:
gregp
  • Constructor Details

  • Method Details

    • charAt

      public char charAt​(int index)
      Specified by:
      charAt in interface java.lang.CharSequence
    • length

      public int length()
      Specified by:
      length in interface java.lang.CharSequence
    • subSequence

      public CharArrayCharSequence.CharSequenceView subSequence​(int start, int end)
      Specified by:
      subSequence in interface java.lang.CharSequence
    • view

    • toString

      public java.lang.String toString()
      Specified by:
      toString in interface java.lang.CharSequence
      Overrides:
      toString in class java.lang.Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.lang.Object
    • equals

      public boolean equals​(java.lang.Object obj)
      Overrides:
      equals in class java.lang.Object