Android Open Source - RelayRemote Relay Group






From Project

Back to project page RelayRemote.

License

The source code is released under:

GNU General Public License

If you think the Android project RelayRemote listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

// Copyright (C) 2012 Shane Tully 
////from   w  ww.j a  va2s .  com
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// 
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Lesser General Public License for more details.
// 
// You should have received a copy of the GNU Lesser General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

package com.shanet.relayremote;

import java.util.ArrayList;

public class RelayGroup {

    private int gid;
    private String name;
    private ArrayList<Integer> rids;
    private boolean isOn;
    
    public RelayGroup() {
        this("", null);
    }
    
    public RelayGroup(String name, ArrayList<Integer> rids) {
        this(-1, name, rids, false);
    }
    
    public RelayGroup(int gid, String name, ArrayList<Integer> rids, boolean isOn) {
        this.gid  = gid;
        this.name = name;
        this.rids = rids;
        this.isOn = isOn;
    }
    
    public int getGid() {
         return gid;
    }
    
    public String getName() {
        return name;
    }
    
    public ArrayList<Integer> getRids() {
        return rids;
    }
    
    public boolean isOn() {
        return isOn;
    }
    
    public void setGid(int gid) {
        this.gid = gid;
    }
    
    public void setName(String name) {
        this.name = name;
    }
    
    public void setRids(ArrayList<Integer> rids) {
        this.rids = rids;
    }
    
    public void turnOn() {
        isOn = true;
    }
    
    public void turnOff() {
        isOn = false;
    }
    
    public String toString() {
        return "GID: " + gid + "\nName: " + name + "\nRids: " + rids.toString() + "\nis on? " + isOn;
    }
}




Java Source Code List

com.shanet.relayremote.AddRelayGroup.java
com.shanet.relayremote.AddRelay.java
com.shanet.relayremote.Background.java
com.shanet.relayremote.Constants.java
com.shanet.relayremote.Database.java
com.shanet.relayremote.DialogUtils.java
com.shanet.relayremote.EditRelayGroup.java
com.shanet.relayremote.EditRelay.java
com.shanet.relayremote.Main.java
com.shanet.relayremote.NFC.java
com.shanet.relayremote.RelayAdapter.java
com.shanet.relayremote.RelayGroup.java
com.shanet.relayremote.RelayGroupsAdapter.java
com.shanet.relayremote.RelayGroupsFragment.java
com.shanet.relayremote.Relay.java
com.shanet.relayremote.RelaysFragment.java
com.shanet.relayremote.Server.java
com.shanet.relayremote.Utils.java
com.shanet.relayremote.VersionUtils.java
com.shanet.relayremote.WidgetConfig.java
com.shanet.relayremote.Widget.java