Skip to content

GitLab

  • Menu
    • Projects Groups Snippets
      Help
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • P project08
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • cs2-20wi
  • project08
  • Merge requests
  • !1

An error occurred while fetching the assigned milestone of the selected merge_request.
Merged
Created 5 years ago by Adam Blank@blankOwner

Fix return value from ISet.add()

  • Overview 0
  • Commits 1
  • Pipelines 1
  • Changes 1
  • Adam Blank @blank merged 5 years ago

    merged

  • Adam Blank @blank mentioned in commit 61c3de6a 5 years ago

    mentioned in commit 61c3de6a

  • You're only seeing other activity in the feed. To add a comment, switch to one of the following options.
Please register or sign in to reply
Compare
  • master (base)

and
  • latest version
    87d63321
    1 commit, 5 years ago

1 file
+ 1
- 12

    Preferences

    File browser
    Compare changes
src/edu/caltech/cs2/interfaces/ISet.java
+ 1
- 12
  • View file @ 87d63321

  • Edit in single-file editor

  • Edit in Web IDE


Show all unchanged lines Show 20 lines
* element
*/
public boolean add(E e) {
return this.internalDictionary.put(e, new Object()) != null;
return this.internalDictionary.put(e, new Object()) == null;
}
Show 20 lines Show all unchanged lines Show 20 lines
return this.internalDictionary.remove(e) != null;
}
/**
* Removes all of the elements from this set (optional operation).
* The set will be empty after this call returns.
*
* @throws UnsupportedOperationException if the {@code clear} method
* is not supported by this set
*/
public void clear() {
throw new UnsupportedOperationException();
}
@Override
public String toString() {
StringBuilder b = new StringBuilder();
Show 20 lines Show all unchanged lines
0 Assignees
None
Assign to
0 Reviewers
None
Request review from
Milestone
No milestone
None
None
Time tracking
No estimate or time spent
Labels
0
None
0
None
    Assign labels
  • Manage project labels

Lock merge request
Unlocked
0
0 participants
Reference:
Source branch: fix/add

Menu

Projects Groups Snippets
Help