Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
titleGenerated Java files
Note: Qualified name is used for child node "login".  
 
File : Login.java
package org.onosproject.yang.gen.v1.http.acme.example.com.system.rev20070609.acmesystem; 

import java.util.BitSet; 
import java.util.List; 

/** 
 * Abstraction of an entity which represents the functionality of login. 
 */ 
public interface Login { 

    /** 
     * Identify the leaf of Login. 
     */ 
    public enum LeafIdentifier implements org.onosproject.yang.model.LeafIdentifier{ 
        /** 
         * Represents name. 
         */ 
        NAME(1); 

        private int leafIndex; 

        public int getLeafIndex() { 
            return leafIndex; 
        } 

        LeafIdentifier(int value) { 
            this.leafIndex = value; 
        } 
    } 

    /** 
     * Returns the attribute name. 
     * 
     * @return name value of name 
     */ 
    String name(); 

    /** 
     * Returns the attribute valueLeafFlags. 
     * 
     * @return valueLeafFlags value of valueLeafFlags 
     */ 
    BitSet valueLeafFlags(); 

    /** 
     * Returns the attribute login. 
     * 
     * @return login list of login 
     */ 
    List<org.onosproject.yang.gen.v1.http.acme.example.com.system.rev20070609.acmesystem.login.Login> login(); 

    /** 
     * Sets the attribute name. 
     * 
     * @param name value of name 
     */ 
    void name(String name); 

    /** 
     * Sets the attribute login. 
     * 
     * @param login list of login 
     */ 
    void login(List<org.onosproject.yang.gen.v1.http.acme.example.com.system.rev20070609.acmesystem.login 
            .Login> login); 

    /** 
     * Adds to the list of login. 
     * 
     * @param addTo value of login 
     */ 
    void addToLogin(org.onosproject.yang.gen.v1.http.acme.example.com.system.rev20070609.acmesystem.login 
            .Login addTo); 


    /** 
     * Checks if the leaf value is set. 
     * 
     * @param leaf leaf whose value status needs to checked 
     * @return result of leaf value set in object 
     */ 
    boolean isLeafValueSet(LeafIdentifier leaf); 
}

File : DefaultLogin.java

package org.onosproject.yang.gen.v1.http.acme.example.com.system.rev20070609.acmesystem; 

import com.google.common.base.MoreObjects; 
import java.util.ArrayList; 
import java.util.BitSet; 
import java.util.List; 
import java.util.Objects; 
import org.onosproject.yang.model.InnerModelObject; 
import org.onosproject.yang.model.MultiInstanceObject; 

/** 
 * Represents the implementation of login. 
 * 
 * <p> 
 * valueLeafFlags identify the leafs whose value are explicitly set 
 * Applicable in protocol edit and query operation. 
 * </p> 
 */ 
public class DefaultLogin extends InnerModelObject 
        implements Login, MultiInstanceObject<LoginKeys> { 
    protected String name; 
    protected BitSet valueLeafFlags = new BitSet(); 
    protected List<org.onosproject.yang.gen.v1.http.acme.example.com.system.rev20070609.acmesystem.login 
            .Login> login; 

    @Override 
    public String name() { 
        return name; 
    } 

    @Override 
    public BitSet valueLeafFlags() { 
        return valueLeafFlags; 
    } 

    @Override 
    public List<org.onosproject.yang.gen.v1.http.acme.example.com.system.rev20070609.acmesystem 
            .login.Login> login() { 
        return login; 
    } 

    @Override 
    public void name(String name) { 
        valueLeafFlags.set(LeafIdentifier.NAME.getLeafIndex()); 
        this.name = name; 
    } 

    @Override 
    public void login(List<org.onosproject.yang.gen.v1.http.acme.example.com.system.rev20070609.acmesystem 
            .login.Login> login) { 
        this.login = login; 
    } 

    @Override 
    public void addToLogin(org.onosproject.yang.gen.v1.http.acme.example.com.system.rev20070609.acmesystem 
            .login.Login addTo) { 
        if (login == null) { 
            login = new ArrayList<>(); 
        } 
        login.add(addTo); 
    } 


    @Override 
    public int hashCode() { 
        return Objects.hash(name, valueLeafFlags, login); 
    } 

    @Override 
    public boolean equals(Object obj) { 
        if (this == obj) { 
            return true; 
        } 
        if (obj instanceof DefaultLogin) { 
            DefaultLogin other = (DefaultLogin) obj; 
            return 
                Objects.equals(name, other.name) && 
                Objects.equals(valueLeafFlags, other.valueLeafFlags) && 
                Objects.equals(login, other.login); 
        } 
        return false; 
    } 

    @Override 
    public String toString() { 
        return MoreObjects.toStringHelper(getClass()) 
            .omitNullValues() 
            .add("name", name) 
            .add("valueLeafFlags", valueLeafFlags) 
            .add("login", login) 
            .toString(); 
    } 


    /** 
     * Creates an instance of defaultLogin. 
     */ 
    public DefaultLogin() { 
    } 


    @Override 
    public boolean isLeafValueSet(LeafIdentifier leaf) { 
        return valueLeafFlags.get(leaf.getLeafIndex()); 
    } 

}
 
 
File : LoginKeys.java

package org.onosproject.yang.gen.v1.http.acme.example.com.system.rev20070609.acmesystem;
import java.lang.String;
import org.onosproject.yang.model.KeyInfo;
import java.util.Objects;
/**
 * Represents the implementation of login.
 */
public class LoginKeys implements KeyInfo<DefaultLogin> {
    protected String name;
    /**
     * Returns the attribute name.
     *
     * @return name value of name
     */
    public String name() {
        return name;
    }
    /**
     * Sets the value to attribute name.
     *
     * @param name value of name
     */
    public void name(String name) {
        this.name = name;
    }

    @Override
    public int hashCode() {
        return Objects.hash(name);
    }
    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj instanceof LoginKeys) {
            LoginKeys other = (LoginKeys) obj;
            return
                Objects.equals(name, other.name);
        }
        return false;
    }
}


 

Grouping and uses

Overview

...