|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object model.util.Channel
public class Channel
This is a simple data class that holds a address, value pair.
Field Summary | |
---|---|
short |
address
The address for this channel. |
short |
value
The value for this channel. |
Constructor Summary | |
---|---|
Channel()
This constructor creates a new channel with the default values. |
|
Channel(short _address,
short _value)
This constructor creates a new channel with the given values. |
Method Summary | |
---|---|
int |
compareTo(Channel c)
This method is part of the Comparable interface. |
static short[] |
getAddresses(Channel[] channels)
This method will return an array of addresses given an array of Channels. |
static Channel[] |
makeChannels(short[] addresses,
short[] values)
This method will return an array of Channels given arrays of addresses and values. |
static Channel[] |
replaceValues(Channel[] oldValues,
short[] newValues)
This method will replace the values in the given channels with the given values. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public short address
public short value
Constructor Detail |
---|
public Channel()
public Channel(short _address, short _value)
_address
- The address for this channel._value
- The value for this channel.Method Detail |
---|
public int compareTo(Channel c)
TODO: Fill in the return info for this method. I always forget the default behavior of compareTo
compareTo
in interface Comparable<Channel>
c
- The channel to be compared with this channel.public String toString()
toString
in class Object
public static short[] getAddresses(Channel[] channels)
channels
- The array of channels to have the addresses pulled out.
public static Channel[] replaceValues(Channel[] oldValues, short[] newValues)
oldValues
- The channels with the old values. It must be the same length as the array of newValues.newValues
- The array of values to replace the oldValues with. It must be the same length as the array
of oldValues.
public static Channel[] makeChannels(short[] addresses, short[] values)
addresses
- This is the array of the addresses. It must be the same length as the array of values.values
- This is the array of the values. It must be the same length as the array of addresses.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |