Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
*
* Copyright (c) 2006-2019, Speedment, Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"); You may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package com.speedment.tool.config;
import com.speedment.common.function.FloatSupplier;
import com.speedment.common.function.OptionalBoolean;
import com.speedment.common.mapstream.MapStream;
import com.speedment.runtime.config.Document;
import static com.speedment.runtime.config.util.DocumentUtil.toStringHelper;
import com.speedment.runtime.core.util.OptionalUtil;
import com.speedment.tool.config.component.DocumentPropertyComponent;
import com.speedment.tool.config.util.NumericProperty;
import com.speedment.tool.config.util.SimpleNumericProperty;
import static java.util.Collections.newSetFromMap;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.OptionalDouble;
import java.util.OptionalInt;
import java.util.OptionalLong;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.function.*;
import java.util.stream.Stream;
import javafx.beans.InvalidationListener;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.DoubleProperty;
import javafx.beans.property.FloatProperty;
import javafx.beans.property.IntegerProperty;
import javafx.beans.property.LongProperty;
import javafx.beans.property.Property;
import javafx.beans.property.SimpleBooleanProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
import javafx.beans.value.ChangeListener;
import static javafx.collections.FXCollections.observableList;
import static javafx.collections.FXCollections.observableMap;
import javafx.collections.ListChangeListener;
import javafx.collections.ObservableList;
import javafx.collections.ObservableMap;
/**
*
* @param the type of the implementing class
*
* @author Emil Forslund
* @since 2.3.0
*/
public abstract class AbstractDocumentProperty>
implements DocumentProperty {
private final Map config;
private final transient ObservableMap> properties;
private final transient ObservableMap>> children;
/**
* Invalidation listeners required by the {@code Observable} interface.
*/
private final transient Set listeners;
protected AbstractDocumentProperty() {
this.config = new ConcurrentHashMap<>();
this.properties = observableMap(new ConcurrentHashMap<>());
this.children = observableMap(new ConcurrentHashMap<>());
this.listeners = newSetFromMap(new ConcurrentHashMap<>());
}
@Override
public final Map getData() {
return config;
}
@Override
@Deprecated // Deprecated to use but will not be removed from the API
public final void put(String key, Object val) {
throw new UnsupportedOperationException(
"Observable config documents does not support the put()-operation " +
"directly. Instead you should request the appropriate property or " +
"observable list for the specific key and modify it."
);
}
@Override
public final Optional