Skip to content

Add method to allow replacing an object #88

Description

@benbeadle

It'd be nice if there was a replaceObject method:

public void replaceObject(final int index, final Object object)

to allow updating an object in the list.

My initial solution was to loop through the objects, removing then re-adding all except the one I want to update where I switch in the new object. The problem is that if the user has already started their next query, the objects get added after the query and the user must remove all tokens to clear the query.

Thanks, and great work!

Activity

  1. CapitanRedBeard commented on Mar 4, 2015

    @CapitanRedBeard

    Is this implemented @mgod ?

  2. mgod commented on Mar 4, 2015

    @mgod
    Contributor

    I haven't added this. I'm not sure if anyone in a fork has this tucked away somewhere. I haven't been able to come up with a simple method to add this functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions