improve performance

This commit is contained in:
hlq07 2018-05-29 05:34:50 +08:00
parent 9edd86dff5
commit 0919bf58f5
1 changed files with 7 additions and 8 deletions

View File

@ -13,10 +13,7 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.io.IOException;
import java.util.Calendar;
import java.util.Collection;
import java.util.HashMap;
import java.util.Objects;
import java.util.*;
import static org.cutem.cutecalendar.model.TodoItem.*;
@ -117,8 +114,9 @@ public abstract class NewItemBuilder extends VBox {
protected boolean autoCheck() {
for (String key : mAutoSet.keySet()) {
String val = mAutoSet.get(key).getValue();
for (Map.Entry<String, ReadOnlyStringProperty> e : mAutoSet.entrySet()) {
String key = e.getKey();
String val = e.getValue().getValue();
if (!checkFormation(key, val)) {
String info = mAutoAlertInfo.get(key);
showAlert(info);
@ -148,8 +146,9 @@ public abstract class NewItemBuilder extends VBox {
protected TodoItemFactory autoBuild() {
TodoItemFactory factory = new TodoItemFactory();
for (String key : mAutoSet.keySet()) {
String val = mAutoSet.get(key).getValue();
for (Map.Entry<String, ReadOnlyStringProperty> e : mAutoSet.entrySet()) {
String key = e.getKey();
String val = e.getValue().getValue();
factory.stringProperties(key, val);
}