Package sprouts.impl

Interface SproutsFactory

All Known Implementing Classes:
Sprouts

public interface SproutsFactory
Creates instances of the various property types in the Sprouts library. This interface allows you to plug in your own implementations of the Sprouts properties through the Sprouts.setFactory(SproutsFactory) method.
  • Method Details

    • delegateOf

      <T> ValDelegate<T> delegateOf(Val<T> source, Channel channel, SingleChange change, @Nullable T newValue, @Nullable T oldValue)
    • delegateOf

      <T> ValsDelegate<T> delegateOf(Vals<T> source, SequenceChange changeType, int index, Vals<T> newValues, Vals<T> oldValues)
    • event

      Event event()
    • eventOf

      Event eventOf(Event.Executor executor)
    • maybeOfNullable

      default <T> Maybe<@Nullable T> maybeOfNullable(Class<T> type, @Nullable T item)
    • maybeOfNull

      default <T> Maybe<@Nullable T> maybeOfNull(Class<T> type)
    • maybeOf

      default <T> Maybe<T> maybeOf(T item)
    • maybeOf

      default <T> Maybe<T> maybeOf(Maybe<T> toBeCopied)
    • maybeOfNullable

      default <T extends @Nullable Object> Maybe<@Nullable T> maybeOfNullable(Maybe<T> toBeCopied)
    • valOfNullable

      <T> Val<@Nullable T> valOfNullable(Class<T> type, @Nullable T item)
    • valOfNull

      <T> Val<@Nullable T> valOfNull(Class<T> type)
    • valOf

      <T> Val<T> valOf(T item)
    • valOf

      <T> Val<T> valOf(Val<T> toBeCopied)
    • valOfNullable

      <T extends @Nullable Object> Val<@Nullable T> valOfNullable(Val<T> toBeCopied)
    • viewOf

      <T extends @Nullable Object> Viewable<T> viewOf(Val<T> source)
    • viewOf

      <T extends @Nullable Object, U extends @Nullable Object> Viewable<@NonNull T> viewOf(Val<T> first, Val<U> second, BiFunction<T,U,@NonNull T> combiner)
    • viewOfNullable

      <T extends @Nullable Object, U extends @Nullable Object> Viewable<@Nullable T> viewOfNullable(Val<T> first, Val<U> second, BiFunction<T,U,@Nullable T> combiner)
    • viewOf

      <T extends @Nullable Object, U extends @Nullable Object, R> Viewable<R> viewOf(Class<R> type, Val<T> first, Val<U> second, BiFunction<T,U,R> combiner)
    • viewOfNullable

      <T extends @Nullable Object, U extends @Nullable Object, R> Viewable<@Nullable R> viewOfNullable(Class<R> type, Val<T> first, Val<U> second, BiFunction<T,U,@Nullable R> combiner)
    • viewOf

      <T extends @Nullable Object> Viewables<T> viewOf(Vals<T> source)
    • viewOf

      <T extends @Nullable Object, U> Viewables<U> viewOf(U nullObject, U errorObject, Vals<T> source, Function<T,@Nullable U> mapper)
    • viewOf

      <T extends @Nullable Object, U extends @Nullable Object> Viewable<T> viewOf(Class<T> type, Val<U> source, Function<U,T> mapper)
    • viewOf

      <T extends @Nullable Object, U extends @Nullable Object> Viewable<U> viewOf(U nullObject, U errorObject, Val<T> source, Function<T,@Nullable U> mapper)
    • viewOfNullable

      <T extends @Nullable Object, U extends @Nullable Object> Viewable<@Nullable U> viewOfNullable(Class<U> type, Val<T> source, Function<T,@Nullable U> mapper)
    • lensOf

      <T extends @Nullable Object, B extends @Nullable Object> Var<B> lensOf(Var<T> source, Lens<T,B> lens)
    • lensOf

      <T extends @Nullable Object, B extends @Nullable Object> Var<B> lensOf(Var<T> source, B nullObject, Lens<T,B> lens)
    • lensOfNullable

      <T extends @Nullable Object, B extends @Nullable Object> Var<B> lensOfNullable(Class<B> type, Var<T> source, Lens<T,B> lens)
    • varOfNullable

      <T> Var<@Nullable T> varOfNullable(Class<T> type, @Nullable T item)
    • varOfNull

      <T> Var<@Nullable T> varOfNull(Class<T> type)
    • varOf

      <T> Var<T> varOf(T item)
    • varOf

      <T, V extends T> Var<T> varOf(Class<T> type, V item)
    • valsOf

      <T> Vals<T> valsOf(Class<T> type)
    • valsOf

      <T> Vals<T> valsOf(Class<T> type, Val<T>... vars)
    • valsOf

      <T> Vals<T> valsOf(Val<T> first, Val<T>... rest)
    • valsOf

      <T> Vals<T> valsOf(T first, T... rest)
    • valsOf

      <T> Vals<T> valsOf(Class<T> type, T... items)
    • valsOf

      <T> Vals<T> valsOf(Class<T> type, Iterable<Val<T>> properties)
    • valsOf

      <T> Vals<T> valsOf(Class<T> type, Vals<T> vals)
    • valsOfNullable

      <T> Vals<@Nullable T> valsOfNullable(Class<T> type)
    • valsOfNullable

      <T> Vals<@Nullable T> valsOfNullable(Class<T> type, Val<@Nullable T>... vals)
    • valsOfNullable

      <T> Vals<@Nullable T> valsOfNullable(Class<T> type, @Nullable T... items)
    • valsOfNullable

      <T> Vals<@Nullable T> valsOfNullable(Val<@Nullable T> first, Val<@Nullable T>... rest)
    • valsOfNullable

      <T> Vals<@Nullable T> valsOfNullable(Class<T> type, Vals<@Nullable T> vals)
    • varsOf

      <T> Vars<T> varsOf(Class<T> type, Var<T>... vars)
    • varsOf

      <T> Vars<T> varsOf(Class<T> type)
    • varsOf

      <T> Vars<T> varsOf(Var<T> first, Var<T>... rest)
    • varsOf

      <T> Vars<T> varsOf(T first, T... rest)
    • varsOf

      <T> Vars<T> varsOf(Class<T> type, T... items)
    • varsOf

      <T> Vars<T> varsOf(Class<T> type, Iterable<Var<T>> vars)
    • varsOfNullable

      <T> Vars<@Nullable T> varsOfNullable(Class<T> type, Var<@Nullable T>... vars)
    • varsOfNullable

      <T> Vars<@Nullable T> varsOfNullable(Class<T> type)
    • varsOfNullable

      <T> Vars<@Nullable T> varsOfNullable(Class<T> type, @Nullable T... values)
    • varsOfNullable

      <T> Vars<@Nullable T> varsOfNullable(Var<@Nullable T> first, Var<@Nullable T>... rest)
    • varsOfNullable

      <T> Vars<@Nullable T> varsOfNullable(Class<T> type, Iterable<Var<@Nullable T>> vars)
    • tupleOf

      <T> Tuple<T> tupleOf(Class<T> type, Maybe<T>... vars)
    • tupleOf

      <T> Tuple<T> tupleOf(Class<T> type)
    • tupleOf

      <T> Tuple<T> tupleOf(Maybe<T> first, Maybe<T>... rest)
    • tupleOf

      <T> Tuple<T> tupleOf(T first, T... rest)
    • tupleOf

      <T> Tuple<T> tupleOf(Class<T> type, T... items)
    • tupleOf

      <T> Tuple<T> tupleOf(Class<T> type, Iterable<T> vars)
    • tupleOfNullable

      <T> Tuple<@Nullable T> tupleOfNullable(Class<T> type, Maybe<@Nullable T>... vars)
    • tupleOfNullable

      <T> Tuple<@Nullable T> tupleOfNullable(Class<T> type)
    • tupleOfNullable

      <T> Tuple<@Nullable T> tupleOfNullable(Class<T> type, @Nullable T... values)
    • tupleOfNullable

      <T> Tuple<@Nullable T> tupleOfNullable(Maybe<@Nullable T> first, Maybe<@Nullable T>... rest)
    • tupleOfNullable

      <T> Tuple<@Nullable T> tupleOfNullable(Class<T> type, Iterable<@Nullable T> iterable)
    • associationOf

      <K, V> Association<K,V> associationOf(Class<K> keyType, Class<V> valueType)
    • resultOf

      <V> Result<V> resultOf(Class<V> type)
    • resultOf

      <V> Result<V> resultOf(V value)
    • resultOf

      <V> Result<V> resultOf(Class<V> type, @Nullable V value)
    • resultOf

      <V> Result<V> resultOf(V value, Iterable<Problem> problems)
    • resultOf

      <V> Result<V> resultOf(Class<V> type, Iterable<Problem> problems)
    • resultOf

      <V> Result<V> resultOf(Class<V> type, @Nullable V value, Iterable<Problem> problems)
    • resultOf

      <V> Result<V> resultOf(Class<V> type, @Nullable V value, Problem problem)
    • resultOf

      <V> Result<V> resultOf(Class<V> type, Problem problem)
    • resultOfList

      <V> Result<List<V>> resultOfList(Class<V> type, Problem problem)
    • resultOfList

      <V> Result<List<V>> resultOfList(Class<V> type, List<V> list)
    • resultOfList

      <V> Result<List<V>> resultOfList(Class<V> type, List<V> list, Iterable<Problem> problems)
    • resultOfTry

      <V> Result<V> resultOfTry(Class<V> type, Supplier<V> supplier)
    • actionOfWeak

      <O, D> WeakAction<O,D> actionOfWeak(O owner, BiConsumer<O,D> action)
    • observerOfWeak

      <O> WeakObserver<O> observerOfWeak(O owner, Consumer<O> action)
    • defaultId

      String defaultId()
      The default id for properties which do not have an id explicitly specified. The id of a property is used to identify it in the system or as part of a view model and convert it into other data formats like key/value based data stores.
      Returns:
      The default id for properties which do not have an id explicitly specified. This must never return null and it is recommended to be a constant or cached object due to this method being called frequently.
    • idPattern

      Pattern idPattern()
      The regex Pattern used to validate property ids. All ids must match this pattern.
      Returns:
      The regex Pattern used to validate property ids. This must never return null and it is recommended to be a constant or cached object due to this method being called frequently.
    • defaultChannel

      Channel defaultChannel()
      The default channel used for change events. This channel is used to give events a chanel when no channel is explicitly specified.
      Returns:
      The default channel used for change events. This must never return null and it is recommended to be a constant or cached object due to this method being called frequently.
    • defaultObservableChannel

      Channel defaultObservableChannel()
      The default channel used for Observable events, registered through the Observable.subscribe(Observer) method.
      Returns:
      The default channel used for change events. This must never return null and it is recommended to be a constant or cached object due to this method being called frequently.