Skip to content

Commit

Permalink
Nightly commit 10/12/2021
Browse files Browse the repository at this point in the history
Group and Macro data objects done
  • Loading branch information
Rusettsten committed Oct 13, 2021
1 parent c046d0e commit 41f7144
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 51 deletions.
62 changes: 32 additions & 30 deletions photon/src/main/java/com/strikete/photon/objects/Group.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,51 +7,53 @@ public class Group {
/*
* VARIABLES
*/
private String UID;
private ArrayList<Channel> channels = new ArrayList<Channel>();
private String name;
private float groupNum;
private int index;
private String uid;
private String label;
private ArrayList<Integer> channels = new ArrayList<Integer>();


/*
* METHODS
* METHODS - GETTERS
*/
public String getUID() {
return this.UID;
}
public ArrayList<Channel> getChannels(){
return channels;
public float getGroupNumber() {
return groupNum;
}
public ArrayList<Integer> getChannelsAsInt(){
ArrayList<Integer> channelsAsInt = new ArrayList<Integer>();
for(int x = 0; x < channels.size(); x++) {
channelsAsInt.add(channels.get(x).getChannelNum());
}
return channelsAsInt;
public float getIndexNumber() {
return index;
}
public Channel getChannel(int index) {
return channels.get(index);
public String getUid() {
return uid;
}
public String getName() {
return this.name;
public String getLabel() {
return label;
}
public int getChannelSize() {
return channels.size();
}
public float getGroupNum() {
return this.groupNum;
public ArrayList<Integer> getChannels(){
return channels;
}


public void addChannel(Channel channelIn) { //As of right now if you need to modify channels you'll just need to create a new group object.
channels.add(channelIn);
/*
* METHODS - SETTERS
*/
public void setLabel(String labelIn) {
this.label = labelIn;
}
public void setChannels(ArrayList<Integer> channelsIn) {
this.channels = channelsIn;
}
public void addChannel(int channelIn) {
this.channels.add(channelIn);
}


/*
* CONSTRUCTOR
*/
public Group(String UIDin, String nameIn, float groupNumIn) {
this.UID = UIDin;
this.name = nameIn;
public Group(float groupNumIn, int indexIn, String uidIn) {
this.groupNum = groupNumIn;
this.index = indexIn;
this.uid = uidIn;
}
}
}
56 changes: 35 additions & 21 deletions photon/src/main/java/com/strikete/photon/objects/Macro.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,43 +5,57 @@ public class Macro {
/*
* VARIABLES
*/
private float macroNum;
private String UID;
private String name;
private int macroNum;
private int index;
private String uid;
private String label;
private String mode;
private String commandText;


/*
* METHODS
* METHODS - GETTERS
*/
public float getMacroNum() {
return this.macroNum;
public int getMacroNumber() {
return macroNum;
}
public int getIndex() {
return index;
}
public String getUID() {
return this.UID;
public String getUid() {
return uid;
}
public String getName() {
return this.name;
public String getLabel() {
return label;
}
public String getMode() {
return this.mode;
return mode;
}
public String getCommandText() {
return this.commandText;
return commandText;
}

public void addCommandText(String commandIn) {
this.commandText = this.commandText + " " + commandIn;

/*
* METHODS - SETTERS
*/
public void setLabel(String labelIn) {
this.label = labelIn;
}
public void setMode(String modeIn) {
this.mode = modeIn;
}
public void setCommandText(String commandTextIn) {
this.commandText = commandTextIn;
}


/*
* CONSTRUCTORS
* CONSTRUCTOR
*/
public Macro(float macroNumIn, String UIDin, String nameIn, String modeIn) {
public Macro(int macroNumIn, int indexIn, String uidIn) {
this.macroNum = macroNumIn;
this.UID = UIDin;
this.name = nameIn;
this.mode = modeIn;
this.index = indexIn;
this.uid = uidIn;
}

}
}

0 comments on commit 41f7144

Please sign in to comment.