Class BindProfileList.StringSection

java.lang.Object
com.isode.dsapi.profile.BindProfileList.StringSection
Enclosing class:
BindProfileList

protected static class BindProfileList.StringSection extends Object
Utility class which just stores information about a substring inside another String. The class is provided to allow an ISettingsEncrypter to return information about which substring inside a larger String is to be encrypted/decrypted.
Since:
15.2
  • Constructor Details

    • StringSection

      public StringSection(String s, int startPos, int endPos)
      Construct a new object.
      Parameters:
      s - the complete String; must not be null.
      startPos - the start position in the String; must be a valid index inside the String
      endPos - the end position in the String; must be a valid index inside the String
  • Method Details

    • substring

      public String substring()
      Return the substring (i.e. the bit from the startPos to endPos.
      Returns:
      the substring of the original string. Won't ever be null.
    • prefix

      public String prefix()
      Return the bit of the String before the specified substring.
      Returns:
      the prefix, which may be "" but won't be null.
    • suffix

      public String suffix()
      Return the bit of the String following the specified substring.
      Returns:
      the suffix, which may be "" but won't be null.
    • toString

      public String toString()
      Overrides:
      toString in class Object