Skip to content

Instantly share code, notes, and snippets.

@netopyr
Created November 3, 2016 13:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save netopyr/ef93362551a19b4201db88e135df45c6 to your computer and use it in GitHub Desktop.
Save netopyr/ef93362551a19b4201db88e135df45c6 to your computer and use it in GitHub Desktop.
Main state class of the ReduxFX sample project.
package com.netopyr.reduxfx.todo.state;
import javaslang.collection.Seq;
import org.apache.commons.lang3.builder.ToStringBuilder;
public final class AppModel {
private final String newTodoText;
private final Seq<TodoEntry> todos;
private final Filter filter;
public AppModel(String newTodoText, Seq<TodoEntry> todos, Filter filter) {
this.newTodoText = newTodoText;
this.todos = todos;
this.filter = filter;
}
public String getNewTodoText() {
return newTodoText;
}
public Seq<TodoEntry> getTodos() {
return todos;
}
public Filter getFilter() {
return filter;
}
@Override
public String toString() {
return new ToStringBuilder(this)
.append("newTodoText", newTodoText)
.append("todos", todos)
.append("filter", filter)
.toString();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment