Completed
Push — master ( 54b84a...25fb7a )
by Esaú
02:10
created

StringIndexOutOfBoundsException.js   A

Complexity

Total Complexity 1
Complexity/F 1

Size

Lines of Code 45
Function Count 1

Duplication

Duplicated Lines 0
Ratio 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 0
wmc 1
c 1
b 0
f 0
nc 1
mnd 0
bc 1
fnc 1
dl 0
loc 45
ccs 8
cts 8
cp 1
crap 0
rs 10
bpm 1
cpm 1
noi 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A ➔ StringIndexOutOfBoundsException 0 3 1
1
// StringIndexOutOfBoundsException.js
2
"use strict";
3
4
// :: DEPENDENCIES
5
6
// load native dependencies
7 1
const path = require("path");
8
9
// load local dependencies
10 1
const IndexOutOfBoundsException = require(path.join(__dirname, "IndexOutOfBoundsException.js"));
11
12
// :: BASIC SETUP
13
14
/**
15
 * Thrown by String methods to indicate that an index is either negative or greater than the size of the string. For
16
 * some methods such as the charAt method, this exception also is thrown when the index is equal to the size of the
17
 * string.
18
 * @param {String} message - The message describing the <tt>StringIndexOutOfBoundsException</tt>.
19
 * @param {Number} code - The unique code that identifies the cause of the <tt>StringIndexOutOfBoundsException</tt>.
20
 * @augments IndexOutOfBoundsException
21
 * @constructor
22
 * @see https://docs.oracle.com/javase/8/docs/api/java/lang/StringIndexOutOfBoundsException.html
23
 */
24 1
const StringIndexOutOfBoundsException = function (message, code) {
25 197
	IndexOutOfBoundsException.call(this, message, code);
26
};
27
28
// :: INHERITANCE
29
30
// set the IndexOutOfBoundsException 'class' as the parent in the prototype chain
31 1
StringIndexOutOfBoundsException.prototype             = Object.create(IndexOutOfBoundsException.prototype);
32 1
StringIndexOutOfBoundsException.prototype.constructor = IndexOutOfBoundsException;
33
34
// :: PROTOTYPE
35
36
/**
37
 * The name used to identify a <tt>StringIndexOutOfBoundsException</tt>.
38
 * @type {String}
39
 * @default
40
 */
41 1
StringIndexOutOfBoundsException.prototype.name = "StringIndexOutOfBoundsException";
42
43
// :: EXPORT
44
45
// export the StringIndexOutOfBoundsException 'class'
46
module.exports = StringIndexOutOfBoundsException;