Class KriptonLiveDataHandlerImpl<T>

java.lang.Object
com.abubusoft.kripton.android.livedata.KriptonLiveDataHandlerImpl<T>
Type Parameters:
T - The type of the live data
All Implemented Interfaces:
LiveDataHandler

public abstract class KriptonLiveDataHandlerImpl<T>
extends java.lang.Object
implements LiveDataHandler
A LiveData class that can be invalidated and computed on demand.

This is an internal class for now, might be public if we see the necessity.

  • Constructor Summary

    Constructors 
    Constructor Description
    KriptonLiveDataHandlerImpl()
    Creates a computable live data which is computed when there are active observers.
  • Method Summary

    Modifier and Type Method Description
    protected abstract T compute()
    Compute.
    KriptonLiveData<T> getLiveData()
    Returns the LiveData managed by this class.
    void invalidate()
    Invalidates the LiveData.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • KriptonLiveDataHandlerImpl

      public KriptonLiveDataHandlerImpl()
      Creates a computable live data which is computed when there are active observers.

      It can also be invalidated via invalidate() which will result in a call to compute() if there are active observers (or when they start observing)

  • Method Details