SWEN221 - Method Flashcards

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/110

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 4:45 AM on 3/19/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

111 Terms

1
New cards

Object - hashCode()

Function: Returns an integer hash code value for the object. This value is used by hashing-based collections such as HashMap and HashSet.

Return Type: int

2
New cards

Object - equals(o)

Function: Compares this object to the specified object for equality. Returns true if they are considered equal.

Return Type: boolean

3
New cards

Object - toString()

Function: Returns a string representation of the object.

Return Type: String

4
New cards

List - add(e)

Function: Adds the specified element to the end of the list.

Return Type: boolean

5
New cards

List - addAll(c)

Function: Appends all elements from the specified collection to the end of the list.

Return Type: boolean

6
New cards

List - clear()

Function: Removes all elements from the list.

Return Type: None

7
New cards

List - contains(o)

Function: Returns true if the list contains the specified element.

Return Type: boolean

8
New cards

List - containsAll(c)

Function: Returns true if the list contains all elements in the specified collection.

Return Type: boolean

9
New cards

List - copyOf(coll)

Function: Creates an unmodifiable list containing the elements of the specified collection.

Return Type: List

10
New cards

List - get(index)

Function: Returns the element at the specified position in the list.

Return Type: E

11
New cards

List - indexOf(o)

Function: Returns the index of the first occurrence of the specified element in the list, or -1 if it is not found.

Return Type: int

12
New cards

List - isEmpty()

Function: Returns true if the list contains no elements.

Return Type: boolean

13
New cards

List - iterator()

Function: Returns an iterator over the elements in the list.

Return Type: Iterator

14
New cards

List - lastIndexOf(o)

Function: Returns the index of the last occurrence of the specified element in the list, or -1 if it is not found.

Return Type: int

15
New cards

List - of()

Function: Creates an unmodifiable empty list.

Return Type: List

16
New cards

List - of(elements)

Function: Creates an unmodifiable list containing the specified elements.

Return Type: List

17
New cards

List - remove(index)

Function: Removes the element at the specified position in the list.

Return Type: E

18
New cards

List - remove(o)

Function: Removes the first occurrence of the specified element from the list, if it is present.

Return Type: boolean

19
New cards

List - removeAll(c)

Function: Removes from the list all elements that are also contained in the specified collection.

Return Type: boolean

20
New cards

List - set(index, element)

Function: Replaces the element at the specified position in the list with the specified element.

Return Type: E

21
New cards

List - size()

Function: Returns the number of elements in the list.

Return Type: int

22
New cards

List - sort(c)

Function: Sorts the list according to the order imposed by the specified comparator.

Return Type: None

23
New cards

List - subList(fromIndex,toIndex)

Function: Returns a view of the portion of the list between the specified fromIndex, inclusive, and toIndex, exclusive.

Return Type: View - an object that shows or accesses existing data without creating a separate independent copy.

24
New cards

List - stream()

Function: Returns a sequential stream with the list as its source.

Return Type: Stream

25
New cards

List - forEach(action)

Function: Performs the given action for each element of the list.

Return Type: None

26
New cards

List - removeIf(filter)

Function: Removes all elements of the list that satisfy the given predicate.

Return Type: boolean

27
New cards

List - replaceAll(operator)

Function: Replaces each element of the list with the result of applying the given operator to that element.

Return Type: None

28
New cards

Set - add(e)

Function: Adds the specified element to the set if it is not already present.

Return Type: boolean

29
New cards

Set - addAll(c)

Function: Adds all elements in the specified collection to the set if they are not already present.

Return Type: boolean

30
New cards

Set - clear()

Function: Removes all elements from the set.

Return Type: None

31
New cards

Set - contains(o)

Function: Returns true if the set contains the specified element.

Return Type: boolean

32
New cards

Set - containsAll(c)

Function: Returns true if the set contains all elements in the specified collection.

Return Type: boolean

33
New cards

Set - copyOf(coll)

Function: Creates an unmodifiable set containing the elements of the specified collection. This is a static factory method.

Return Type: Set

34
New cards

Set - isEmpty()

Function: Returns true if the set contains no elements.

Return Type: boolean

35
New cards

Set - iterator()

Function: Returns an iterator over the elements in the set. The iteration order is not guaranteed unless the specific set implementation guarantees it.

Return Type: Iterator

36
New cards

Set - of()

Function: Creates an unmodifiable empty set. This is a static factory method.

Return Type: Set

37
New cards

Set - of(elements)

Function: Creates an unmodifiable set containing the specified elements. This is a static factory method.

Return Type: Set

38
New cards

Set - remove(o)

Function: Removes the specified element from the set if it is present.

Return Type: boolean

39
New cards

Set - removeAll(c)

Function: Removes from the set all elements that are also contained in the specified collection.

Return Type: boolean

40
New cards

Set - retainAll(c)

Function: Retains only the elements in the set that are also contained in the specified collection.

Return Type: boolean

41
New cards

Set - size()

Function: Returns the number of elements in the set.

Return Type: int

42
New cards

Set - stream()

Function: Returns a sequential stream with the set as its source.

Return Type: Stream

43
New cards

Set - forEach(action)

Function: Performs the given action for each element of the set.

Return Type: None

44
New cards

Set - removeIf(filter)

Function: Removes all elements of the set that satisfy the given predicate.

Return Type: boolean

45
New cards

Map - clear()

Function: Removes all key-value mappings from the map.

Return Type: None

46
New cards

Map - containsKey(key)

Function: Returns true if the map contains a mapping for the specified key.

Return Type: boolean

47
New cards

Map - containsValue(value)

Function: Returns true if the map maps one or more keys to the specified value.

Return Type: boolean

48
New cards

Map - copyOf(map)

Function: Creates an unmodifiable map containing the mappings of the specified map. This is a static factory method.

Return Type: Map

49
New cards

Map - entry(k, v)

Function: Creates an unmodifiable key-value entry containing the specified key and value. This is a static factory method.

Return Type: Map.Entry

50
New cards

Map - entrySet()

Function: Returns a set view of the key-value mappings contained in the map.

Return Type: Set>

51
New cards

Map - get(key)

Function: Returns the value associated with the specified key, or null if the key is not mapped.

Return Type: V

52
New cards

Map - getOrDefault(key, defaultValue)

Function: Returns the value associated with the specified key, or the given default value if the key is not mapped.

Return Type: V

53
New cards

Map - isEmpty()

Function: Returns true if the map contains no key-value mappings.

Return Type: boolean

54
New cards

Map - keySet()

Function: Returns a set view of the keys contained in the map.

Return Type: Set

55
New cards

Map - of()

Function: Creates an unmodifiable empty map. This is a static factory method.

Return Type: Map

56
New cards

Map - of(k,v,..k,v)

Function: Creates an unmodifiable map containing the specified key-value mappings. This is a static factory method.

Return Type: Map

57
New cards

Map - ofEntries(entries)

Function: Creates an unmodifiable map containing the mappings in the specified entries. This is a static factory method.

Return Type: Map

58
New cards

Map - put(key, value)

Function: Associates the specified value with the specified key in the map.

Return Type: V

59
New cards

Map - putAll(m)

Function: Copies all mappings from the specified map into this map.

Return Type: None

60
New cards

Map - putIfAbsent(key,value)

Function: Associates the specified value with the specified key only if the key is not already mapped or is mapped to null.

Return Type: V

61
New cards

Map - remove(key)

Function: Removes the mapping for the specified key from the map if it is present.

Return Type: V

62
New cards

Map - size()

Function: Returns the number of key-value mappings in the map.

Return Type: int

63
New cards

Map - values()

Function: Returns a collection view of the values contained in the map.

Return Type: Collection

64
New cards

Map - forEach(action)

Function: Performs the given action for each key-value mapping in the map.

Return Type: None

65
New cards

Map - replaceAll(function)

Function: Replaces each value in the map with the result of applying the given function to that key and value.

Return Type: None

66
New cards

Map - merge(key,value,remappingFunction)

Function: If the key is not already mapped or is mapped to null, associates it with the given value. Otherwise, replaces the value with the result of the remapping function.

Return Type: V

67
New cards

Map - compute(key,remappingFunction)

Function: Computes a new mapping for the specified key using the given remapping function.

Return Type: V

68
New cards

Map - computeIfAbsent(key,mappingFunction)

Function: If the specified key is not already mapped or is mapped to null, computes its value using the given mapping function and enters it into the map.

Return Type: V

69
New cards

Map - computeIfPresent(key,remappingFunction)

Function: If the specified key is present and mapped to a non-null value, computes a new mapping using the given remapping function.

Return Type: V

70
New cards

Map.Entry - getKey()

Function: Returns the key corresponding to this entry.

Return Type: K

71
New cards

Map.Entry - getValue()

Function: Returns the value corresponding to this entry.

Return Type: V

72
New cards

Math - min(a,b)

Function: Returns the smaller of the two given values.

Return Type: same type as the arguments

73
New cards

Math - max(a,b)

Function: Returns the larger of the two given values.

Return Type: same type as the arguments

74
New cards

String - codePointAt(index)

Function: Returns the Unicode code point value at the specified index.

Return Type: int

75
New cards

String - codePoints()

Function: Returns a stream of Unicode code point values from the string.

Return Type: IntStream

76
New cards

String - compareTo(anotherString)

Function: Compares two strings lexicographically.

Return Type: int

77
New cards

String - compareToIgnoreCase(str)

Function: Compares two strings lexicographically, ignoring case differences.

Return Type: int

78
New cards

String - contains(s)

Function: Returns true if the string contains the specified sequence of characters.

Return Type: boolean

79
New cards

String - endsWith(suffix)

Function: Returns true if the string ends with the specified suffix.

Return Type: boolean

80
New cards

String - equalsIgnoreCase(anotherString)

Function: Compares this string to another string, ignoring case differences.

Return Type: boolean

81
New cards

String - formatted(args)

Function: Returns a formatted string using this string as the format pattern and the given arguments.

Return Type: String

82
New cards

String - indexOf(str)

Function: Returns the index of the first occurrence of the specified substring, or -1 if it is not found.

Return Type: int

83
New cards

String - indexOf(str, fromIndex)

Function: Returns the index of the first occurrence of the specified substring, starting the search at the given index, or -1 if it is not found.

Return Type: int

84
New cards

String - isBlank()

Function: Returns true if the string is empty or contains only whitespace characters.

Return Type: boolean

85
New cards

String - isEmpty()

Function: Returns true if the string has length 0.

Return Type: boolean

86
New cards

String - lastIndexOf(str)

Function: Returns the index of the last occurrence of the specified substring, or -1 if it is not found.

Return Type: int

87
New cards

String - lastIndexOf(str, fromIndex)

Function: Returns the index of the last occurrence of the specified substring, searching backward starting at the given index, or -1 if it is not found.

Return Type: int

88
New cards

String - length()

Function: Returns the number of characters in the string.

Return Type: int

89
New cards

String - lines()

Function: Returns a stream of lines extracted from the string.

Return Type: Stream

90
New cards

String - repeat(count)

Function: Returns a string whose value is this string repeated the specified number of times.

Return Type: String

91
New cards

String - replace(target, replacement)

Function: Returns a new string resulting from replacing all occurrences of the target sequence with the replacement sequence.

Return Type: String

92
New cards

String - split(regex)

Function: Splits the string around matches of the given regular expression.

Return Type: String[]

93
New cards

String - startsWith(prefix)

Function: Returns true if the string starts with the specified prefix.

Return Type: boolean

94
New cards

String - startsWith(prefix, toffset)

Function: Returns true if the substring beginning at the specified index starts with the given prefix.

Return Type: boolean

95
New cards

String - substring(beginIndex)

Function: Returns a new string that begins at the specified index and continues to the end of the string.

Return Type: String

96
New cards

String - substring(beginIndex, endIndex)

Function: Returns a new string that contains characters from the specified begin index up to, but not including, the end index.

Return Type: String

97
New cards

String - toLowerCase()

Function: Returns a new string with all characters converted to lowercase.

Return Type: String

98
New cards

String - toUpperCase()

Function: Returns a new string with all characters converted to uppercase.

Return Type: String

99
New cards

String - trim()

Function: Returns a new string with leading and trailing whitespace removed.

Return Type: String

100
New cards

Integer - compare(x, y)

Function: Compares the two specified int values numerically.

Return Type: int

Explore top flashcards

flashcards
Chapter 10.3
24
Updated 1163d ago
0.0(0)
flashcards
amendments
76
Updated 1152d ago
0.0(0)
flashcards
Final vocab HELA 9
111
Updated 824d ago
0.0(0)
flashcards
Englisch Vok
220
Updated 99d ago
0.0(0)
flashcards
11 tema
69
Updated 822d ago
0.0(0)
flashcards
African Civilization Test
65
Updated 1224d ago
0.0(0)
flashcards
Biochem test 2
121
Updated 872d ago
0.0(0)
flashcards
Chapter 10.3
24
Updated 1163d ago
0.0(0)
flashcards
amendments
76
Updated 1152d ago
0.0(0)
flashcards
Final vocab HELA 9
111
Updated 824d ago
0.0(0)
flashcards
Englisch Vok
220
Updated 99d ago
0.0(0)
flashcards
11 tema
69
Updated 822d ago
0.0(0)
flashcards
African Civilization Test
65
Updated 1224d ago
0.0(0)
flashcards
Biochem test 2
121
Updated 872d ago
0.0(0)