src/main/java/rest/repository/InMemRepository.java
// tell if element is successfully updated
tell if element is successfully updated
tell if element is successfully updated
public boolean update(int id, T element) {
		if(element == null) {
			return false;
		}else {
			Optional<T> eleToBeUpdate = getById(id);
			eleToBeUpdate.ifPresent(original -> updateIfExsits(original, element));
			return eleToBeUpdate.isPresent();
		}
	}
public boolean update ( int id , T element ) { if ( element == null ) { return false ; } else { Optional < T > eleToBeUpdate = getById ( id ) ; eleToBeUpdate . ifPresent ( original -> updateIfExsits ( original , element ) ) ; return eleToBeUpdate . isPresent ( ) ; } }
tell if element is successfully updated
tell if element is successfully updated