-
Notifications
You must be signed in to change notification settings - Fork 6
Map and HashMap
The HashMap class provides basic implementation of the Map interface, used to map key-pair values. While Arrays store values in an ordered collection and must be accessed with an index number a HashMap stores items in key-value pairs that are accessed by an index of another type. One object is used as a key or index for another object or value, which can be stored in different or the same type.
Relevant methods include: "put()" to add items by key and value, "get()" to access an item referring to its key, "remove()" to clear a specific item by its key, and "clear()" to remove all items. Items of a HashMap can be iterated through by a for each loop with the "keySet()" method to return keys and "values()" for values. Keys and values are all objects and to use primitive types, like "int", and equivalent wrapper class must be specified (Integer) or Boolean for boolean, Character for char, etc.
Examples here: W3 Schools Page on HashMap
This is an officially licensed product of Team 4026. Decatur Robotics 2024 is not sponsored by any other Team, and is not responsible for any damages caused by using this product or trusting the programming team, which is by far the least most trustworthy team(Shadow owen money gang, we love coding the robot). By using this product, you are consenting to your information, and thus your identity to be stolen and first-born child taken.
- Editing Documentation & Markdown Syntax
- Code Team to-do List
- Code Standards
- Common Library Structure
- Interfaces
- General Setup
- Branching System
- How to Create Pull Requests
- How to Switch Branches
- Code Reviews
- Reverting Commits
- Singleton Pattern
- Software Installations
- Necessary IntelliJ Plugins
- Vendordeps
- Setting Up New Projects
- Autoformatter Set Up
- Showbot Requirements
- Autonomous
- Calling a Command Based on a Button Press
- CAN
- Clearing Sticky Faults
- Current Limits
- PID Config and Usage
- Robot.java, TeleopInit, DisabledInit
- RoboRio Ports
- SetDefaultCommand
- Wait for Time
- SlewRateLimiter
- LEDs
- InstantCommand
- PhotonVision
- Apriltags
- Camera Display on Shuffleboard
- Object Detection
- Raspberry Pi
- Network Tables
- List of Network Tables (2023)
Up to date as of SJ2, end of 2023 season