public List < Command > removeFromSet ( final UUID setId , final Object value ) { final State state = createCommandList ( new WithCommandType ( ) { @ Override public void invoke ( final State state ) { createObservableObject ( value , state ) ; } } , false ) ; final boolean keyIsObservableObject = state . lastObjectWasObservable ; final RemoveFromSet msg = new RemoveFromSet ( ) ; msg . setSetId ( setId ) ; msg . setValue ( valueMapper . map ( value , keyIsObservableObject ) ) ; state . commands . add ( state . commands . size ( ) - 1 , msg ) ; return state . commands ; }
Creates the list with commands necessary to remove a object from a set .