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

io.stepfunc.dnp3.Classes Maven / Gradle / Ivy

There is a newer version: 1.6.0
Show newest version
// This library is provided under the terms of a non-commercial license.
// 
// Please refer to the source repository for details:
// 
// https://github.com/stepfunc/dnp3/blob/master/LICENSE.txt
// 
// Please contact Step Function I/O if you are interested in commercial license:
// 
// [email protected]
package io.stepfunc.dnp3;

import org.joou.*;

/**
 * Class 0, 1, 2 and 3 config
 */
public final class Classes
{
    /**
     * Class 0 (static data)
     */
    public boolean class0;
    /**
     * Class 1 events
     */
    public boolean class1;
    /**
     * Class 2 events
     */
    public boolean class2;
    /**
     * Class 3 events
     */
    public boolean class3;
    /**
     * @param value New value for the 'class0' field
     * @return Reference to this instance of the class with the modified value
     */
    public Classes withClass0(boolean value)
    {
        this.class0 = value;
        return this;
    }
    /**
     * @param value New value for the 'class1' field
     * @return Reference to this instance of the class with the modified value
     */
    public Classes withClass1(boolean value)
    {
        this.class1 = value;
        return this;
    }
    /**
     * @param value New value for the 'class2' field
     * @return Reference to this instance of the class with the modified value
     */
    public Classes withClass2(boolean value)
    {
        this.class2 = value;
        return this;
    }
    /**
     * @param value New value for the 'class3' field
     * @return Reference to this instance of the class with the modified value
     */
    public Classes withClass3(boolean value)
    {
        this.class3 = value;
        return this;
    }
    
    /**
     * Fully construct {@link Classes} specifying the value of each field
     * 
     * @param class0 Class 0 (static data)
     * @param class1 Class 1 events
     * @param class2 Class 2 events
     * @param class3 Class 3 events
     */
    public Classes(boolean class0, boolean class1, boolean class2, boolean class3)
    {
            this.class0 = class0;
            this.class1 = class1;
            this.class2 = class2;
            this.class3 = class3;
    }
    
    /**
     * Initialize all classes to true
     * 
     * 

Values are initialized to: *

    *
  • {@link Classes#class0} : true
  • *
  • {@link Classes#class1} : true
  • *
  • {@link Classes#class2} : true
  • *
  • {@link Classes#class3} : true
  • *
* * @return Initialized {@link Classes} instance */ public static Classes all() { return new Classes(true, true, true, true); } /** * Initialize all classes to false * *

Values are initialized to: *

    *
  • {@link Classes#class0} : false
  • *
  • {@link Classes#class1} : false
  • *
  • {@link Classes#class2} : false
  • *
  • {@link Classes#class3} : false
  • *
* * @return Initialized {@link Classes} instance */ public static Classes none() { return new Classes(false, false, false, false); } void _assertFieldsNotNull() { } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy