Question: it should not have any arraylist and im using eclipse program to write this code Modifier and TypeMethodDescriptionstatic int [ ] filter ( int [
it should not have any arraylist and im using eclipse program to write this code
Modifier and TypeMethodDescriptionstatic intfilterintarray intlowerLimit intupperLimit
Returns a new array with values in array that exists in the range defined by lowerLimit inclusive and upperLimit inclusive
static java.lang.StringgetArrayStringintarray charseparator
Return a string where each array entry except the last one is followed by the specified separator.
static java.lang.StringBuffergetArrayStringsLongerThanjavalang.StringBufferarray intlength
Returns a StringBuffer array with COPIES of StringBuffer objects in the array parameter that have a length greater than the length parameter.
static intgetInstancesintarray intlowerLimit intupperLimit
Returns the number of values that are in the range defined by lowerLimit inclusive and upperLimit inclusive
static voidrotateintarray booleanleftRotation intpositions
Rotates the provided array left if leftRotation is true; right otherwise.
Methods inherited from classjavalang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
Utilities
publicUtilities
Method Detail
getArrayString
public staticjavalang.StringgetArrayStringintarray charseparator
Return a string where each array entry except the last one is followed by the specified separator. An empty string will be return if the array has no elements.
Parameters:
array
separator
Returns:
string
Throws:
java.lang.IllegalArgumentException When a null array parameter is provided
getInstances
public staticintgetInstancesintarray intlowerLimit intupperLimit
Returns the number of values that are in the range defined by lowerLimit inclusive and upperLimit inclusive
Parameters:
array
lowerLimit
upperLimit
Returns:
number of values in range
Throws:
java.lang.IllegalArgumentException When a null array parameter is provided
filter
public staticintfilterintarray intlowerLimit intupperLimit
Returns a new array with values in array that exists in the range defined by lowerLimit inclusive and upperLimit inclusive
Parameters:
array
lowerLimit
upperLimit
Returns:
array with values in range
Throws:
java.lang.IllegalArgumentException
When a null array parameter is provided
java.lang.IllegalArgumentException
When lowerLimit is greater than upperLimit
rotate
public staticvoidrotateintarray booleanleftRotation intpositions
Rotates the provided array left if leftRotation is true; right otherwise. The number of positions to rotate is determined by positions. For example, rotating the array two positions to the left will update the array to Only arrays with or more elements will be rotated. Hint: adding private methods that rotate an array one position to the left and one position to the right can help.
Parameters:
array
leftRotation
positions
Throws:
java.lang.IllegalArgumentException When a null array parameter is provided
getArrayStringsLongerThan
public staticjavalang.StringBuffergetArrayStringsLongerThanjavalang.StringBufferarray intlength
Returns a StringBuffer array with COPIES of StringBuffer objects in the array parameter that have a length greater than the length parameter. If no strings are found an empty array will be returned.
Parameters:
array
length
Returns:
Throws:
java.lang.IllegalArgumentException When a null array parameter is provided. You may not use ArrayLists or methods from the Arrays class no array list
sysImplementation A package folder where you will complete the implementation of theUtilitiesclass
tests A package folder where you will find a file calledStudentTestsjavawere you are expected to write tests for your program.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
