1c1b53ee5d095a74b84c21257fb4cd00e33f748baYigit Boyar/* 264db0cc15b78b62a1d44a70fc8b4552e660d952cYigit Boyar * Copyright (C) 2017 The Android Open Source Project 3c1b53ee5d095a74b84c21257fb4cd00e33f748baYigit Boyar * 4c1b53ee5d095a74b84c21257fb4cd00e33f748baYigit Boyar * Licensed under the Apache License, Version 2.0 (the "License"); 5c1b53ee5d095a74b84c21257fb4cd00e33f748baYigit Boyar * you may not use this file except in compliance with the License. 6c1b53ee5d095a74b84c21257fb4cd00e33f748baYigit Boyar * You may obtain a copy of the License at 7c1b53ee5d095a74b84c21257fb4cd00e33f748baYigit Boyar * 8c1b53ee5d095a74b84c21257fb4cd00e33f748baYigit Boyar * http://www.apache.org/licenses/LICENSE-2.0 9c1b53ee5d095a74b84c21257fb4cd00e33f748baYigit Boyar * 10c1b53ee5d095a74b84c21257fb4cd00e33f748baYigit Boyar * Unless required by applicable law or agreed to in writing, software 11c1b53ee5d095a74b84c21257fb4cd00e33f748baYigit Boyar * distributed under the License is distributed on an "AS IS" BASIS, 12c1b53ee5d095a74b84c21257fb4cd00e33f748baYigit Boyar * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13c1b53ee5d095a74b84c21257fb4cd00e33f748baYigit Boyar * See the License for the specific language governing permissions and 14c1b53ee5d095a74b84c21257fb4cd00e33f748baYigit Boyar * limitations under the License. 15c1b53ee5d095a74b84c21257fb4cd00e33f748baYigit Boyar */ 16c1b53ee5d095a74b84c21257fb4cd00e33f748baYigit Boyar 17ba069d50913c3fb250bb60ec310439db36895337Alan Viverettepackage androidx.lifecycle; 18c1b53ee5d095a74b84c21257fb4cd00e33f748baYigit Boyar 19c1b53ee5d095a74b84c21257fb4cd00e33f748baYigit Boyar/** 20e69e470336d0b6a1b4a16fe1783af17143d0c426Sergey Vasilinets * A simple callback that can receive from {@link LiveData}. 21c1b53ee5d095a74b84c21257fb4cd00e33f748baYigit Boyar * 22c1b53ee5d095a74b84c21257fb4cd00e33f748baYigit Boyar * @param <T> The type of the parameter 23e69e470336d0b6a1b4a16fe1783af17143d0c426Sergey Vasilinets * 247c41ee306fc78feaa0043c65bf82e65935bd9d35Sergey Vasilinets * @see LiveData LiveData - for a usage description. 25c1b53ee5d095a74b84c21257fb4cd00e33f748baYigit Boyar */ 26c1b53ee5d095a74b84c21257fb4cd00e33f748baYigit Boyarpublic interface Observer<T> { 27c1b53ee5d095a74b84c21257fb4cd00e33f748baYigit Boyar /** 28c1b53ee5d095a74b84c21257fb4cd00e33f748baYigit Boyar * Called when the data is changed. 29c1b53ee5d095a74b84c21257fb4cd00e33f748baYigit Boyar * @param t The new data 30c1b53ee5d095a74b84c21257fb4cd00e33f748baYigit Boyar */ 31936c65df96baaf8c66cdf45a4e1d913e68f24510Sergey Vasilinets void onChanged(T t); 32c1b53ee5d095a74b84c21257fb4cd00e33f748baYigit Boyar} 33