All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.logspace.jvm.agent.api.event.EventProperties Maven / Gradle / Ivy

The newest version!
/**
 * Logspace
 * Copyright (c) 2015 Indoqa Software Design und Beratung GmbH. All rights reserved.
 * This program and the accompanying materials are made available under the terms of
 * the Eclipse Public License Version 1.0, which accompanies this distribution and
 * is available at http://www.eclipse.org/legal/epl-v10.html.
 */
package io.logspace.jvm.agent.api.event;

import java.util.ArrayList;
import java.util.Collection;

/**
 * A collection of {@link EventProperty EventProperties}.
 */
public class EventProperties {

    private final Collection booleanProperties = new ArrayList();
    private final Collection dateProperties = new ArrayList();
    private final Collection integerProperties = new ArrayList();
    private final Collection longProperties = new ArrayList();
    private final Collection floatProperties = new ArrayList();
    private final Collection doubleProperties = new ArrayList();
    private final Collection stringProperties = new ArrayList();

    public void add(BooleanEventProperty property) {
        this.booleanProperties.add(property);
    }

    public void add(DateEventProperty e) {
        this.dateProperties.add(e);
    }

    public void add(DoubleEventProperty e) {
        this.doubleProperties.add(e);
    }

    public void add(FloatEventProperty e) {
        this.floatProperties.add(e);
    }

    public void add(IntegerEventProperty e) {
        this.integerProperties.add(e);
    }

    public void add(LongEventProperty e) {
        this.longProperties.add(e);
    }

    public void add(StringEventProperty e) {
        this.stringProperties.add(e);
    }

    public Collection getBooleanProperties() {
        return this.booleanProperties;
    }

    public Collection getDateProperties() {
        return this.dateProperties;
    }

    public Collection getDoubleProperties() {
        return this.doubleProperties;
    }

    public Collection getFloatProperties() {
        return this.floatProperties;
    }

    public Collection getIntegerProperties() {
        return this.integerProperties;
    }

    public Collection getLongProperties() {
        return this.longProperties;
    }

    public Collection getStringProperties() {
        return this.stringProperties;
    }

    public boolean isEmpty() {
        return this.booleanProperties.isEmpty() && this.dateProperties.isEmpty() && this.doubleProperties.isEmpty()
            && this.floatProperties.isEmpty() && this.integerProperties.isEmpty() && this.longProperties.isEmpty()
            && this.stringProperties.isEmpty();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy