JML

java.lang
Class String

java.lang.Object
  extended byjava.lang.String
All Implemented Interfaces:
CharSequence, Comparable, Serializable

public final class String
extends Object
implements Serializable, Comparable, CharSequence


Nested Class Summary
(package private) static class String.1
           
private static class String.CaseInsensitiveComparator
           
 
Field Summary
static Comparator CASE_INSENSITIVE_ORDER
           
private  int count
           
private  int hash
           
private  int offset
           
private static ObjectStreamField[] serialPersistentFields
           
private static long serialVersionUID
           
private  char[] value
           
 
Constructor Summary
  String()
           
  String(byte[])
           
  String(byte[], int)
           
  String(byte[], int, int)
           
  String(byte[], int, int, int)
           
  String(byte[], int, int, String)
           
  String(byte[], int, int, Charset)
           
  String(byte[], String)
           
  String(byte[], Charset)
           
  String(char[])
           
  String(char[], int, int)
           
(package private) String(int, int, char[])
           
  String(int[], int, int)
           
  String(String)
           
  String(StringBuffer)
           
  String(StringBuilder)
           
 
Method Summary
 char charAt(int)
           
private static void checkBounds(byte[], int, int)
           
 int codePointAt(int)
           
 int codePointBefore(int)
           
 int codePointCount(int, int)
           
 int compareTo(Object)
           
 int compareTo(String)
           
 int compareToIgnoreCase(String)
           
 String concat(String)
           
 boolean contains(CharSequence)
           
 boolean contentEquals(CharSequence)
           
 boolean contentEquals(StringBuffer)
           
static String copyValueOf(char[])
           
static String copyValueOf(char[], int, int)
           
 boolean endsWith(String)
           
 boolean equals(Object)
           
 boolean equalsIgnoreCase(String)
           
static String format(String, Object[])
           
static String format(Locale, String, Object[])
           
 byte[] getBytes()
           
 void getBytes(int, int, byte[], int)
           
 byte[] getBytes(String)
           
 byte[] getBytes(Charset)
           
(package private)  void getChars(char[], int)
           
 void getChars(int, int, char[], int)
           
 int hashCode()
           
(package private) static int indexOf(char[], int, int, char[], int, int, int)
           
 int indexOf(int)
           
 int indexOf(int, int)
           
 int indexOf(String)
           
 int indexOf(String, int)
           
 String intern()
           
 boolean isEmpty()
           
(package private) static int lastIndexOf(char[], int, int, char[], int, int, int)
           
 int lastIndexOf(int)
           
 int lastIndexOf(int, int)
           
 int lastIndexOf(String)
           
 int lastIndexOf(String, int)
           
 int length()
           
 boolean matches(String)
           
 int offsetByCodePoints(int, int)
           
 boolean regionMatches(boolean, int, String, int, int)
           
 boolean regionMatches(int, String, int, int)
           
 String replace(char, char)
           
 String replace(CharSequence, CharSequence)
           
 String replaceAll(String, String)
           
 String replaceFirst(String, String)
           
 String[] split(String)
           
 String[] split(String, int)
           
 boolean startsWith(String)
           
 boolean startsWith(String, int)
           
 CharSequence subSequence(int, int)
           
 String substring(int)
           
 String substring(int, int)
           
 char[] toCharArray()
           
 String toLowerCase()
           
 String toLowerCase(Locale)
           
 String toString()
           
 String toUpperCase()
           
 String toUpperCase(Locale)
           
 String trim()
           
static String valueOf(boolean)
           
static String valueOf(char)
           
static String valueOf(char[])
           
static String valueOf(char[], int, int)
           
static String valueOf(double)
           
static String valueOf(float)
           
static String valueOf(int)
           
static String valueOf(Object)
           
static String valueOf(long)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

serialPersistentFields

private static final ObjectStreamField[] serialPersistentFields

count

private final int count

CASE_INSENSITIVE_ORDER

public static final Comparator CASE_INSENSITIVE_ORDER

value

private final char[] value

hash

private int hash

offset

private final int offset

serialVersionUID

private static final long serialVersionUID
Constructor Detail

String

public String()

String

public String(String)

String

public String(char[])

String

public String(char[],
              int,
              int)

String

public String(int[],
              int,
              int)

String

public String(byte[],
              int,
              int,
              int)

String

public String(byte[],
              int)

String

public String(byte[],
              int,
              int,
              String)
       throws UnsupportedEncodingException
Throws:
UnsupportedEncodingException

String

public String(byte[],
              int,
              int,
              Charset)

String

public String(byte[],
              String)
       throws UnsupportedEncodingException
Throws:
UnsupportedEncodingException

String

public String(byte[],
              Charset)

String

public String(byte[],
              int,
              int)

String

public String(byte[])

String

public String(StringBuffer)

String

public String(StringBuilder)

String

String(int,
       int,
       char[])
Method Detail

checkBounds

private static void checkBounds(byte[],
                                int,
                                int)

length

public int length()
Specified by:
length in interface CharSequence

isEmpty

public boolean isEmpty()

charAt

public char charAt(int)
Specified by:
charAt in interface CharSequence

codePointAt

public int codePointAt(int)

codePointBefore

public int codePointBefore(int)

codePointCount

public int codePointCount(int,
                          int)

offsetByCodePoints

public int offsetByCodePoints(int,
                              int)

getChars

void getChars(char[],
              int)

getChars

public void getChars(int,
                     int,
                     char[],
                     int)

getBytes

public void getBytes(int,
                     int,
                     byte[],
                     int)

getBytes

public byte[] getBytes(String)
                throws UnsupportedEncodingException
Throws:
UnsupportedEncodingException

getBytes

public byte[] getBytes(Charset)

getBytes

public byte[] getBytes()

equals

public boolean equals(Object)
Specified by:
equals in interface CharSequence
Overrides:
equals in class Object

contentEquals

public boolean contentEquals(StringBuffer)

contentEquals

public boolean contentEquals(CharSequence)

equalsIgnoreCase

public boolean equalsIgnoreCase(String)

compareTo

public int compareTo(String)

compareToIgnoreCase

public int compareToIgnoreCase(String)

regionMatches

public boolean regionMatches(int,
                             String,
                             int,
                             int)

regionMatches

public boolean regionMatches(boolean,
                             int,
                             String,
                             int,
                             int)

startsWith

public boolean startsWith(String,
                          int)

startsWith

public boolean startsWith(String)

endsWith

public boolean endsWith(String)

hashCode

public int hashCode()
Specified by:
hashCode in interface CharSequence
Overrides:
hashCode in class Object

indexOf

public int indexOf(int)

indexOf

public int indexOf(int,
                   int)

lastIndexOf

public int lastIndexOf(int)

lastIndexOf

public int lastIndexOf(int,
                       int)

indexOf

public int indexOf(String)

indexOf

public int indexOf(String,
                   int)

indexOf

static int indexOf(char[],
                   int,
                   int,
                   char[],
                   int,
                   int,
                   int)

lastIndexOf

public int lastIndexOf(String)

lastIndexOf

public int lastIndexOf(String,
                       int)

lastIndexOf

static int lastIndexOf(char[],
                       int,
                       int,
                       char[],
                       int,
                       int,
                       int)

substring

public String substring(int)

substring

public String substring(int,
                        int)

subSequence

public CharSequence subSequence(int,
                                int)
Specified by:
subSequence in interface CharSequence

concat

public String concat(String)

replace

public String replace(char,
                      char)

matches

public boolean matches(String)

contains

public boolean contains(CharSequence)

replaceFirst

public String replaceFirst(String,
                           String)

replaceAll

public String replaceAll(String,
                         String)

replace

public String replace(CharSequence,
                      CharSequence)

split

public String[] split(String,
                      int)

split

public String[] split(String)

toLowerCase

public String toLowerCase(Locale)

toLowerCase

public String toLowerCase()

toUpperCase

public String toUpperCase(Locale)

toUpperCase

public String toUpperCase()

trim

public String trim()

toString

public String toString()
Specified by:
toString in interface CharSequence
Overrides:
toString in class Object

toCharArray

public char[] toCharArray()

format

public static transient String format(String,
                                      Object[])

format

public static transient String format(Locale,
                                      String,
                                      Object[])

valueOf

public static String valueOf(Object)

valueOf

public static String valueOf(char[])

valueOf

public static String valueOf(char[],
                             int,
                             int)

copyValueOf

public static String copyValueOf(char[],
                                 int,
                                 int)

copyValueOf

public static String copyValueOf(char[])

valueOf

public static String valueOf(boolean)

valueOf

public static String valueOf(char)

valueOf

public static String valueOf(int)

valueOf

public static String valueOf(long)

valueOf

public static String valueOf(float)

valueOf

public static String valueOf(double)

intern

public String intern()

compareTo

public volatile int compareTo(Object)
Specified by:
compareTo in interface Comparable

JML

JML is Copyright (C) 1998-2002 by Iowa State University and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This release depends on code from the MultiJava project and is based in part on the Kopi project Copyright (C) 1990-99 DMS Decision Management Systems Ges.m.b.H.