MCPcopy Create free account

hub / github.com/bobocode-projects/java-fundamentals-exercises / functions

Functions921 in github.com/bobocode-projects/java-fundamentals-exercises

↓ 122 callersMethodget
Returns the value that is mapped to the given key, or null if there is no such key. @param key @return the value that is mapped to the given key, or
2-0-data-structures-and-algorithms/2-2-9-hash-table/src/main/java/com/bobocode/cs/Map.java:30
↓ 82 callersMethodof
This method creates a list of provided elements @param elements elements to add @param <T> generic type @return a new list of elements the were
6-0-test-driven-development/6-1-2-linked-list/src/main/java/com/bobocode/tdd/LinkedList.java:21
↓ 79 callersMethodstream
Generates an infinite int stream of prime numbers. The stream values are 2, 3, 5,... and so on. @return an infinite int stream of prime numbers
5-0-functional-programming/5-4-1-fun-prime-numbers/src/main/java/com/bobocode/fp/PrimeNumbers.java:32
↓ 50 callersMethodadd
Adds an element to the end of the queue. @param element the element to add
2-0-data-structures-and-algorithms/2-2-3-linked-queue/src/main/java/com/bobocode/cs/Queue.java:13
↓ 45 callersMethodcontains
@return true if tree contains element
2-0-data-structures-and-algorithms/2-2-6-binary-search-tree/src/main/java/com/bobocode/cs/BinarySearchTree.java:15
↓ 37 callersMethodset
(int index, T element)
2-0-data-structures-and-algorithms/data-structures-and-algorithms-util/src/main/java/com/bobocode/cs/List.java:9
↓ 33 callersMethodgenerateAccount
()
java-fundamentals-util/src/main/java/com/bobocode/data/Accounts.java:20
↓ 27 callersMethodgetMethodByName
(Class<?> clazz, String methodName)
1-0-java-basics/1-3-1-crazy-generics/src/test/java/com/bobocode/basics/CrazyGenericsTest.java:583
↓ 26 callersMethodaddToTable
(String key, Integer value)
2-0-data-structures-and-algorithms/2-2-9-hash-table/src/test/java/com/bobocode/cs/HashTableTest.java:545
↓ 25 callersMethodgetInternalElement
(int index)
2-0-data-structures-and-algorithms/2-2-4-linked-list/src/test/java/com/bobocode/cs/LinkedListTest.java:523
↓ 25 callersMethodsize
()
2-0-data-structures-and-algorithms/2-2-2-stack/src/main/java/com/bobocode/cs/Stack.java:18
↓ 21 callersMethodinsert
insert an element @return true if element did not exist in the tree and was inserted successfully
2-0-data-structures-and-algorithms/2-2-6-binary-search-tree/src/main/java/com/bobocode/cs/BinarySearchTree.java:10
↓ 21 callersMethodregexChecker
(Pattern pattern, String str2WorkWith)
3-0-java-core/3-6-3-crazy-regex/src/test/java/com/bobocode/se/CrazyRegexTest.java:226
↓ 20 callersMethodaddInternalElements
(int... elements)
2-0-data-structures-and-algorithms/2-2-4-linked-list/src/test/java/com/bobocode/cs/LinkedListTest.java:539
↓ 20 callersMethodgenerateAccountList
(int size)
java-fundamentals-util/src/main/java/com/bobocode/data/Accounts.java:35
↓ 18 callersMethodcallPut
(Class<T> type, T value)
1-0-java-basics/1-3-2-heterogeneous-max-holder/src/test/java/com/bobocode/basics/HeterogeneousMaxHolderTest.java:455
↓ 18 callersMethodgetAccessibleFieldByPredicate
(Object object, Predicate<Field> predicate)
2-0-data-structures-and-algorithms/2-2-3-linked-queue/src/test/java/com/bobocode/cs/LinkedQueueTest.java:361
↓ 18 callersMethodgetInternalSize
()
2-0-data-structures-and-algorithms/2-2-4-linked-list/src/test/java/com/bobocode/cs/LinkedListTest.java:534
↓ 17 callersMethodcollect
(int n, List<Integer> primeNumbersList)
5-0-functional-programming/5-4-1-fun-prime-numbers/src/test/java/com/bobocode/fp/PrimeNumbersTest.java:63
↓ 15 callersMethodcomparing
Returns a comparator of type T that is comparing values extracted using the provided mapper function. <p> E.g. imagine you need to compare accounts by
5-0-functional-programming/5-1-1-crazy-lambdas/src/main/java/com/bobocode/fp/CrazyLambdas.java:208
↓ 15 callersMethodfillTestArray
(Object... elements)
2-0-data-structures-and-algorithms/2-2-5-array-list/src/test/java/com/bobocode/cs/ArrayListTest.java:397
↓ 15 callersMethodgetNodeNext
(Node<T> node)
2-0-data-structures-and-algorithms/2-2-1-node/src/test/java/com/bobocode/cs/NodesTest.java:143
↓ 15 callersMethodgetTestArray
()
2-0-data-structures-and-algorithms/2-2-5-array-list/src/test/java/com/bobocode/cs/ArrayListTest.java:378
↓ 14 callersMethodput
Creates or updates a mapping for a given key and value. If the key is new, it creates a mapping and return null. If the key exists, it updates the val
2-0-data-structures-and-algorithms/2-2-9-hash-table/src/main/java/com/bobocode/cs/Map.java:22
↓ 14 callersMethodremove
Removes a mapping for a given key, and returns a removed value. If there is no such key, it just returns null. @param key @return a removed value or
2-0-data-structures-and-algorithms/2-2-9-hash-table/src/main/java/com/bobocode/cs/Map.java:68
↓ 13 callersMethodcheckKeyValueExists
(Object key, Object value)
2-0-data-structures-and-algorithms/2-2-9-hash-table/src/test/java/com/bobocode/cs/HashTableTest.java:580
↓ 13 callersMethodgetNodeElement
(Node<T> node)
2-0-data-structures-and-algorithms/2-2-1-node/src/test/java/com/bobocode/cs/NodesTest.java:130
↓ 12 callersMethodcompare
Compares two objects of the class T by the value of the field that was randomly chosen. It allows null values for the fields, and it treats null value
3-0-java-core/3-6-4-random-field-comparator/src/main/java/com/bobocode/se/RandomFieldComparator.java:35
↓ 11 callersMethodgetAccessibleFieldByPredicate
(Object object, Predicate<Field> predicate)
2-0-data-structures-and-algorithms/2-2-4-linked-list/src/test/java/com/bobocode/cs/LinkedListTest.java:598
↓ 11 callersMethodisEmpty
()
2-0-data-structures-and-algorithms/2-2-2-stack/src/main/java/com/bobocode/cs/Stack.java:20
↓ 11 callersMethodpush
(T element)
2-0-data-structures-and-algorithms/2-2-2-stack/src/main/java/com/bobocode/cs/Stack.java:14
↓ 11 callersMethodregisterFlight
Adds a new flight number @param flightNumber a flight number to add @return {@code true} if a flight number was added, {@code false} otherwise
4-0-object-oriented-programming/4-3-1-flight-search/src/main/java/com/bobocode/oop/service/FlightService.java:21
↓ 11 callersMethodsetFieldToCompare
(String fieldName, Class<T> classType)
3-0-java-core/3-6-4-random-field-comparator/src/test/java/com/bobocode/se/RandomFieldComparatorTest.java:224
↓ 10 callersMethodaddIntElementToQueue
(int value)
2-0-data-structures-and-algorithms/2-2-3-linked-queue/src/test/java/com/bobocode/cs/LinkedQueueTest.java:286
↓ 9 callersMethodgetHeadObject
()
2-0-data-structures-and-algorithms/2-2-2-stack/src/test/java/com/bobocode/cs/LinkedStackTest.java:328
↓ 9 callersMethodgivenMaxHolderWithData
(Class<?> type, Object value)
1-0-java-basics/1-3-2-heterogeneous-max-holder/src/test/java/com/bobocode/basics/HeterogeneousMaxHolderTest.java:449
↓ 8 callersMethodfrom
Creates a new immutable {@link FileStats} objects using data from text file received as a parameter. @param fileName input text file name @return new
3-0-java-core/3-6-2-file-stats/src/main/java/com/bobocode/se/FileStats.java:16
↓ 8 callersMethodgetNodeElementInt
(Object node)
2-0-data-structures-and-algorithms/2-2-2-stack/src/test/java/com/bobocode/cs/LinkedStackTest.java:333
↓ 8 callersMethodgetRootObject
()
2-0-data-structures-and-algorithms/2-2-6-binary-search-tree/src/test/java/com/bobocode/cs/RecursiveBinarySearchTreeTest.java:324
↓ 8 callersMethodgetTestSize
()
2-0-data-structures-and-algorithms/2-2-5-array-list/src/test/java/com/bobocode/cs/ArrayListTest.java:371
↓ 7 callersMethodcalculateIndex
This method is a critical part of the hast table. The main idea is that having a key, you can calculate its index in the array using the hash code. Si
2-0-data-structures-and-algorithms/2-2-9-hash-table/src/main/java/com/bobocode/cs/HashTable.java:45
↓ 7 callersMethodfillTestTree
(Integer... elements)
2-0-data-structures-and-algorithms/2-2-6-binary-search-tree/src/test/java/com/bobocode/cs/RecursiveBinarySearchTreeTest.java:439
↓ 7 callersMethodgetFunction
(String name)
5-0-functional-programming/5-0-1-lambda-functions-map/src/main/java/com/bobocode/fp/FunctionMap.java:26
↓ 7 callersMethodgetInternalTable
(HashTable<?, ?> hashTable)
2-0-data-structures-and-algorithms/2-2-9-hash-table/src/test/java/com/bobocode/cs/HashTableTest.java:538
↓ 7 callersMethodgetMaxHelper
(Class<T> type)
1-0-java-basics/1-3-2-heterogeneous-max-holder/src/test/java/com/bobocode/basics/HeterogeneousMaxHolderTest.java:469
↓ 6 callersMethodcalculateSumOfSquaresInRange
This method calculates the sum of squares of integer in the range @param startInclusive first element in range @param endInclusive last element in
5-0-functional-programming/5-0-2-stream-sum-of-squares/src/main/java/com/bobocode/fp/SumOfSquares.java:23
↓ 6 callersMethodfillTestStack
(int... elements)
2-0-data-structures-and-algorithms/2-2-2-stack/src/test/java/com/bobocode/cs/LinkedStackTest.java:380
↓ 6 callersMethodgetExerciseAnnotation
()
1-0-java-basics/1-5-0-hello-annotations/src/test/java/com/bobocode/basics/HelloAnnotationsExerciseTest.java:95
↓ 6 callersMethodgetInnerClass
()
2-0-data-structures-and-algorithms/2-2-2-stack/src/test/java/com/bobocode/cs/LinkedStackTest.java:295
↓ 6 callersMethodgetNodesField
(Object node, Predicate<Field> option)
2-0-data-structures-and-algorithms/2-2-6-binary-search-tree/src/test/java/com/bobocode/cs/RecursiveBinarySearchTreeTest.java:354
↓ 6 callersMethodgetSize
()
2-0-data-structures-and-algorithms/2-2-9-hash-table/src/test/java/com/bobocode/cs/HashTableTest.java:597
↓ 6 callersMethodpoll
Retrieves and removes queue head. @return an element that was retrieved from the head or null if queue is empty
2-0-data-structures-and-algorithms/2-2-3-linked-queue/src/main/java/com/bobocode/cs/Queue.java:20
↓ 6 callersMethodvalue
()
2-0-data-structures-and-algorithms/2-2-9-hash-table/src/test/java/com/bobocode/cs/HashTableTest.java:655
↓ 5 callersMethodclear
()
2-0-data-structures-and-algorithms/data-structures-and-algorithms-util/src/main/java/com/bobocode/cs/List.java:25
↓ 5 callersMethodgenerateCreditAccount
()
java-fundamentals-util/src/main/java/com/bobocode/data/Accounts.java:27
↓ 5 callersMethodgetElement
(Object node)
2-0-data-structures-and-algorithms/2-2-6-binary-search-tree/src/test/java/com/bobocode/cs/RecursiveBinarySearchTreeTest.java:364
↓ 5 callersMethodgetInnerSize
()
2-0-data-structures-and-algorithms/2-2-6-binary-search-tree/src/test/java/com/bobocode/cs/RecursiveBinarySearchTreeTest.java:293
↓ 5 callersMethodgetInternalSize
()
2-0-data-structures-and-algorithms/2-2-3-linked-queue/src/test/java/com/bobocode/cs/LinkedQueueTest.java:239
↓ 5 callersMethodhasField
(Class<?> classToSearch, Predicate targetField)
2-0-data-structures-and-algorithms/2-2-3-linked-queue/src/test/java/com/bobocode/cs/LinkedQueueTest.java:234
↓ 5 callersMethodkey
()
2-0-data-structures-and-algorithms/2-2-9-hash-table/src/test/java/com/bobocode/cs/HashTableTest.java:650
↓ 5 callersMethodnext
()
2-0-data-structures-and-algorithms/2-2-9-hash-table/src/test/java/com/bobocode/cs/HashTableTest.java:660
↓ 5 callersMethodsetSize
(int size)
2-0-data-structures-and-algorithms/2-2-9-hash-table/src/test/java/com/bobocode/cs/HashTableTest.java:590
↓ 4 callersMethodcallGetMax
(Class<T> type)
1-0-java-basics/1-3-2-heterogeneous-max-holder/src/test/java/com/bobocode/basics/HeterogeneousMaxHolderTest.java:419
↓ 4 callersMethodcontainsCharacter
Returns {@code true} if this character has appeared in the text, and {@code false} otherwise @param character a specific character to check @return {
3-0-java-core/3-6-2-file-stats/src/main/java/com/bobocode/se/FileStats.java:45
↓ 4 callersMethodgetAccount
Returns the {@link Account} got from {@link AccountProvider}. If account provider does not provide an account, returns a defaultAccount @param accoun
5-0-functional-programming/5-3-1-crazy-optionals/src/main/java/com/bobocode/fp/CrazyOptionals.java:71
↓ 4 callersMethodgetAccountWithFallback
Retrieves account using {@link AccountProvider} and fallbackProvider. In case main provider does not provide an {@link Account} then account should ge
5-0-functional-programming/5-3-1-crazy-optionals/src/main/java/com/bobocode/fp/CrazyOptionals.java:149
↓ 4 callersMethodgetFirst
()
2-0-data-structures-and-algorithms/data-structures-and-algorithms-util/src/main/java/com/bobocode/cs/List.java:13
↓ 4 callersMethodgetGetMaxMethod
()
1-0-java-basics/1-3-2-heterogeneous-max-holder/src/test/java/com/bobocode/basics/HeterogeneousMaxHolderTest.java:426
↓ 4 callersMethodgetLast
()
2-0-data-structures-and-algorithms/data-structures-and-algorithms-util/src/main/java/com/bobocode/cs/List.java:15
↓ 4 callersMethodgetLeftNode
(Object node)
2-0-data-structures-and-algorithms/2-2-6-binary-search-tree/src/test/java/com/bobocode/cs/RecursiveBinarySearchTreeTest.java:369
↓ 4 callersMethodgetPutMethod
()
1-0-java-basics/1-3-2-heterogeneous-max-holder/src/test/java/com/bobocode/basics/HeterogeneousMaxHolderTest.java:433
↓ 4 callersMethodgetRightNode
(Object node)
2-0-data-structures-and-algorithms/2-2-6-binary-search-tree/src/test/java/com/bobocode/cs/RecursiveBinarySearchTreeTest.java:374
↓ 4 callersMethodgetValue
()
1-0-java-basics/1-3-0-hello-generics/src/main/java/com/bobocode/basics/Box.java:17
↓ 4 callersMethodisEmptyQueue
()
2-0-data-structures-and-algorithms/2-2-3-linked-queue/src/test/java/com/bobocode/cs/LinkedQueueTest.java:328
↓ 4 callersMethodpollElementFromQueue
()
2-0-data-structures-and-algorithms/2-2-3-linked-queue/src/test/java/com/bobocode/cs/LinkedQueueTest.java:246
↓ 4 callersMethodpop
()
2-0-data-structures-and-algorithms/2-2-2-stack/src/main/java/com/bobocode/cs/Stack.java:16
↓ 4 callersMethodretrieveAccountGmail
Retrieves an {@link Account} with gmail email using {@link AccountProvider}. If no account is provided or it gets not gmail then returns {@link Option
5-0-functional-programming/5-3-1-crazy-optionals/src/main/java/com/bobocode/fp/CrazyOptionals.java:136
↓ 4 callersMethodretrieveBalance
Retrieves a {@link BigDecimal} balance using null-safe mappings. @param accountProvider @return optional balance
5-0-functional-programming/5-3-1-crazy-optionals/src/main/java/com/bobocode/fp/CrazyOptionals.java:103
↓ 4 callersMethodretrieveCreditBalance
Retrieves a {@link BigDecimal} credit balance using null-safe mappings. @param accountProvider @return optional credit balance
5-0-functional-programming/5-3-1-crazy-optionals/src/main/java/com/bobocode/fp/CrazyOptionals.java:124
↓ 4 callersMethodsetTestSize
(int size)
2-0-data-structures-and-algorithms/2-2-5-array-list/src/test/java/com/bobocode/cs/ArrayListTest.java:364
↓ 3 callersMethodbuildMap
(List<Account> accounts, int nameLengthBound)
5-0-functional-programming/5-2-1-crazy-streams/src/test/java/com/bobocode/fp/CrazyStreamsTest.java:248
↓ 3 callersMethodcontains
(Object node, int element)
2-0-data-structures-and-algorithms/2-2-6-binary-search-tree/src/test/java/com/bobocode/cs/RecursiveBinarySearchTreeTest.java:334
↓ 3 callersMethodcontains
(int element)
2-0-data-structures-and-algorithms/2-2-2-stack/src/test/java/com/bobocode/cs/LinkedStackTest.java:343
↓ 3 callersMethodcontains
(T element)
2-0-data-structures-and-algorithms/data-structures-and-algorithms-util/src/main/java/com/bobocode/cs/List.java:19
↓ 3 callersMethodcontainsKey
Returns true if a given key exist or false otherwise. @param key @return true if a given key exist or false otherwise
2-0-data-structures-and-algorithms/2-2-9-hash-table/src/main/java/com/bobocode/cs/Map.java:38
↓ 3 callersMethodcontainsValue
Returns true if a given value exist or false otherwise. @param value @return true if a given value exist or false otherwise
2-0-data-structures-and-algorithms/2-2-9-hash-table/src/main/java/com/bobocode/cs/Map.java:46
↓ 3 callersMethodcreateNodeOf
(int element)
2-0-data-structures-and-algorithms/2-2-1-node/src/test/java/com/bobocode/cs/NodesTest.java:113
↓ 3 callersMethoddepth
@return max. number of transition between root node and any other node; 0 - if tree is empty or contains 1 element
2-0-data-structures-and-algorithms/2-2-6-binary-search-tree/src/main/java/com/bobocode/cs/BinarySearchTree.java:25
↓ 3 callersMethodget
Retrieves an element by its position index. In case provided index in out of the list bounds it throws {@link IndexOutOfBoundsException} @param index
2-0-data-structures-and-algorithms/2-2-5-array-list/src/main/java/com/bobocode/cs/ArrayList.java:72
↓ 3 callersMethodgetInnerClass
()
2-0-data-structures-and-algorithms/2-2-6-binary-search-tree/src/test/java/com/bobocode/cs/RecursiveBinarySearchTreeTest.java:307
↓ 3 callersMethodgetInnerStaticNodeClass
()
2-0-data-structures-and-algorithms/2-2-3-linked-queue/src/test/java/com/bobocode/cs/LinkedQueueTest.java:227
↓ 3 callersMethodgetMaxAccount
(List<Account> accounts, Comparator<Account> comparator)
5-0-functional-programming/5-3-1-crazy-optionals/src/test/java/com/bobocode/fp/CrazyOptionalsTest.java:426
↓ 3 callersMethodgetNodeNextObject
(Object node)
2-0-data-structures-and-algorithms/2-2-2-stack/src/test/java/com/bobocode/cs/LinkedStackTest.java:338
↓ 3 callersMethodgetOrGenerateAccount
Returns account provided by {@link AccountProvider}. If no account is provided it generates one using {@link Accounts} Please note that additional acc
5-0-functional-programming/5-3-1-crazy-optionals/src/main/java/com/bobocode/fp/CrazyOptionals.java:93
↓ 3 callersMethodgetOverloadedPutMethod
()
1-0-java-basics/1-3-2-heterogeneous-max-holder/src/test/java/com/bobocode/basics/HeterogeneousMaxHolderTest.java:441
↓ 3 callersMethodinsertToSubtree
(Object node, int element)
2-0-data-structures-and-algorithms/2-2-6-binary-search-tree/src/test/java/com/bobocode/cs/RecursiveBinarySearchTreeTest.java:409
↓ 3 callersMethodnewNode
(int element)
2-0-data-structures-and-algorithms/2-2-6-binary-search-tree/src/test/java/com/bobocode/cs/RecursiveBinarySearchTreeTest.java:379
↓ 3 callersMethodof
This method creates a stack of provided elements @param elements elements to add @param <T> generic type @return a new stack of elements that we
2-0-data-structures-and-algorithms/2-2-2-stack/src/main/java/com/bobocode/cs/LinkedStack.java:26
↓ 3 callersMethodprocessAccount
Passes account to {@link AccountService#processAccount(Account)} when account is provided. Otherwise calls {@link AccountService#processWithNoAccount(
5-0-functional-programming/5-3-1-crazy-optionals/src/main/java/com/bobocode/fp/CrazyOptionals.java:82
↓ 3 callersMethodreadWholeFile
Returns a {@link String} that contains whole text from the file specified by name. @param fileName a name of a text file @return string that holds wh
3-0-java-core/3-6-1-file-reader/src/main/java/com/bobocode/se/FileReaders.java:16
next →1–100 of 921, ranked by callers