public FieldScopeLogicMap < V > with ( FieldScopeLogic fieldScopeLogic , V value ) { ImmutableList . Builder < Entry < V >> newEntries = ImmutableList . builder ( ) ; // Earlier entries override later ones, so we insert the new one at the front of the list. newEntries . add ( Entry . of ( fieldScopeLogic , value ) ) ; newEntries . addAll ( entries ) ; return new FieldScopeLogicMap <> ( newEntries . build ( ) ) ; }
Returns a new immutable map that adds the given fields - > value mapping .