Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Libretro
SquirrelJME
Commits
5586fd68
Commit
5586fd68
authored
Jan 01, 2020
by
Stephanie Gawroriski
Browse files
Implement the Array.fill() methods.
parent
2bfbba4e
Changes
1
Hide whitespace changes
Inline
Side-by-side
runt/apis/cldc-compact/java/util/Arrays.java
View file @
5586fd68
...
...
@@ -828,49 +828,166 @@ public class Arrays
return
true
;
}
public
static
void
fill
(
long
[]
__a
,
long
__b
)
/**
* Fills the array with the given value.
*
* @param __a The array to fill.
* @param __v The value to store.
* @throws NullPointerException If the array is null.
* @since 2020/01/01
*/
public
static
void
fill
(
long
[]
__a
,
long
__v
)
throws
NullPointerException
{
throw
new
todo
.
TODO
();
if
(
__a
==
null
)
throw
new
NullPointerException
(
"NARG"
);
for
(
int
i
=
0
,
n
=
__a
.
length
;
i
<
n
;
i
++)
__a
[
i
]
=
__v
;
}
public
static
void
fill
(
int
[]
__a
,
int
__b
)
/**
* Fills the array with the given value.
*
* @param __a The array to fill.
* @param __v The value to store.
* @throws NullPointerException If the array is null.
* @since 2020/01/01
*/
public
static
void
fill
(
int
[]
__a
,
int
__v
)
throws
NullPointerException
{
throw
new
todo
.
TODO
();
if
(
__a
==
null
)
throw
new
NullPointerException
(
"NARG"
);
for
(
int
i
=
0
,
n
=
__a
.
length
;
i
<
n
;
i
++)
__a
[
i
]
=
__v
;
}
public
static
void
fill
(
short
[]
__a
,
short
__b
)
/**
* Fills the array with the given value.
*
* @param __a The array to fill.
* @param __v The value to store.
* @throws NullPointerException If the array is null.
* @since 2020/01/01
*/
public
static
void
fill
(
short
[]
__a
,
short
__v
)
throws
NullPointerException
{
throw
new
todo
.
TODO
();
if
(
__a
==
null
)
throw
new
NullPointerException
(
"NARG"
);
for
(
int
i
=
0
,
n
=
__a
.
length
;
i
<
n
;
i
++)
__a
[
i
]
=
__v
;
}
public
static
void
fill
(
char
[]
__a
,
char
__b
)
/**
* Fills the array with the given value.
*
* @param __a The array to fill.
* @param __v The value to store.
* @throws NullPointerException If the array is null.
* @since 2020/01/01
*/
public
static
void
fill
(
char
[]
__a
,
char
__v
)
throws
NullPointerException
{
throw
new
todo
.
TODO
();
if
(
__a
==
null
)
throw
new
NullPointerException
(
"NARG"
);
for
(
int
i
=
0
,
n
=
__a
.
length
;
i
<
n
;
i
++)
__a
[
i
]
=
__v
;
}
public
static
void
fill
(
byte
[]
__a
,
byte
__b
)
/**
* Fills the array with the given value.
*
* @param __a The array to fill.
* @param __v The value to store.
* @throws NullPointerException If the array is null.
* @since 2020/01/01
*/
public
static
void
fill
(
byte
[]
__a
,
byte
__v
)
throws
NullPointerException
{
throw
new
todo
.
TODO
();
if
(
__a
==
null
)
throw
new
NullPointerException
(
"NARG"
);
for
(
int
i
=
0
,
n
=
__a
.
length
;
i
<
n
;
i
++)
__a
[
i
]
=
__v
;
}
public
static
void
fill
(
boolean
[]
__a
,
boolean
__b
)
/**
* Fills the array with the given value.
*
* @param __a The array to fill.
* @param __v The value to store.
* @throws NullPointerException If the array is null.
* @since 2020/01/01
*/
public
static
void
fill
(
boolean
[]
__a
,
boolean
__v
)
throws
NullPointerException
{
throw
new
todo
.
TODO
();
if
(
__a
==
null
)
throw
new
NullPointerException
(
"NARG"
);
for
(
int
i
=
0
,
n
=
__a
.
length
;
i
<
n
;
i
++)
__a
[
i
]
=
__v
;
}
public
static
void
fill
(
double
[]
__a
,
double
__b
)
/**
* Fills the array with the given value.
*
* @param __a The array to fill.
* @param __v The value to store.
* @throws NullPointerException If the array is null.
* @since 2020/01/01
*/
public
static
void
fill
(
double
[]
__a
,
double
__v
)
throws
NullPointerException
{
throw
new
todo
.
TODO
();
if
(
__a
==
null
)
throw
new
NullPointerException
(
"NARG"
);
for
(
int
i
=
0
,
n
=
__a
.
length
;
i
<
n
;
i
++)
__a
[
i
]
=
__v
;
}
public
static
void
fill
(
float
[]
__a
,
float
__b
)
/**
* Fills the array with the given value.
*
* @param __a The array to fill.
* @param __v The value to store.
* @throws NullPointerException If the array is null.
* @since 2020/01/01
*/
public
static
void
fill
(
float
[]
__a
,
float
__v
)
throws
NullPointerException
{
throw
new
todo
.
TODO
();
if
(
__a
==
null
)
throw
new
NullPointerException
(
"NARG"
);
for
(
int
i
=
0
,
n
=
__a
.
length
;
i
<
n
;
i
++)
__a
[
i
]
=
__v
;
}
public
static
void
fill
(
Object
[]
__a
,
Object
__b
)
/**
* Fills the array with the given value.
*
* @param __a The array to fill.
* @param __v The value to store.
* @throws NullPointerException If the array is null.
* @since 2020/01/01
*/
public
static
void
fill
(
Object
[]
__a
,
Object
__v
)
throws
NullPointerException
{
throw
new
todo
.
TODO
();
if
(
__a
==
null
)
throw
new
NullPointerException
(
"NARG"
);
for
(
int
i
=
0
,
n
=
__a
.
length
;
i
<
n
;
i
++)
__a
[
i
]
=
__v
;
}
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment