Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

javadoc: convert @return into summary fragment #104

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion java/org/contikios/cooja/COOJAProject.java
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ public boolean hasError() {
}

/**
* @return Description or null
* Returns description or null.

*/
public String getDescription() {
return config.getStringValue("DESCRIPTION");
Expand Down
41 changes: 26 additions & 15 deletions java/org/contikios/cooja/Cooja.java
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,8 @@ public void deleteMoteHighlightObserver(Observer observer) {
}

/**
* @return True if simulator is visualized
* Returns true if simulator is visualized.

*/
public static boolean isVisualized() {
return isVisualizedInFrame();
Expand Down Expand Up @@ -1190,7 +1191,8 @@ public void run() {
}

/**
* @return Current desktop pane (simulator visualizer)
* Returns current desktop pane (simulator visualizer).

*/
public JDesktopPane getDesktopPane() {
return myDesktopPane;
Expand Down Expand Up @@ -1381,7 +1383,8 @@ public void unregisterMoteTypes() {
}

/**
* @return All registered mote type classes
* Returns all registered mote type classes.

*/
public Vector<Class<? extends MoteType>> getRegisteredMoteTypes() {
return moteTypeClasses;
Expand Down Expand Up @@ -1418,7 +1421,8 @@ public void unregisterPositioners() {
}

/**
* @return All registered positioner classes
* Returns all registered positioner classes.

*/
public Vector<Class<? extends Positioner>> getRegisteredPositioners() {
return positionerClasses;
Expand Down Expand Up @@ -1454,7 +1458,8 @@ public void unregisterRadioMediums() {
}

/**
* @return All registered radio medium classes
* Returns all registered radio medium classes.

*/
public Vector<Class<? extends RadioMedium>> getRegisteredRadioMediums() {
return radioMediumClasses;
Expand Down Expand Up @@ -2086,7 +2091,8 @@ public JMenu createMotePluginsSubmenu(Mote mote) {
// // GUI CONTROL METHODS ////

/**
* @return Current simulation
* Returns current simulation.

*/
public Simulation getSimulation() {
return mySimulation;
Expand Down Expand Up @@ -2732,7 +2738,8 @@ public static String resolvePathIdentifiers(String path) {
// // EXTERNAL TOOLS SETTINGS METHODS ////

/**
* @return Number of external tools settings
* Returns number of external tools settings.

*/
public static int getExternalToolsSettingsCount() {
return externalToolsSettingNames.length;
Expand All @@ -2750,20 +2757,22 @@ public static String getExternalToolsSettingName(int index) {
}

/**
* @param name
* Returns value.
@param name
* Name of setting
* @return Value
*
*/
public static String getExternalToolsSetting(String name) {
return getExternalToolsSetting(name, null);
}

/**
* @param name
* Returns value.
@param name
* Name of setting
* @param defaultValue
* Default value
* @return Value
*
*/
public static String getExternalToolsSetting(String name, String defaultValue) {
if (specifiedContikiPath != null && "PATH_CONTIKI".equals(name)) {
Expand All @@ -2776,11 +2785,12 @@ public static String getExternalToolsSetting(String name, String defaultValue) {
}

/**
* @param name
* Returns value.
@param name
* Name of setting
* @param defaultValue
* Default value
* @return Value
*
*/
public static String getExternalToolsDefaultSetting(String name, String defaultValue) {
return defaultExternalToolsSettings.getProperty(name, defaultValue);
Expand Down Expand Up @@ -4056,9 +4066,10 @@ public void removeMoteRelation(Mote source, Mote dest) {
}

/**
* @return All current mote relations.
*See {@link #addMoteRelationsObserver(Observer)}.
@return All current mote relations.
*
*
* @see #addMoteRelationsObserver(Observer)
*/
public MoteRelation[] getMoteRelations() {
return moteRelations.toArray(new MoteRelation[moteRelations.size()]);
Expand Down
5 changes: 3 additions & 2 deletions java/org/contikios/cooja/HasQuickHelp.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@

public interface HasQuickHelp {
/**
* @return Quick help. May be HTML formatted, but must not include the
* document html-tags.
* Returns quick help. May be HTML formatted, but must not include the
document html-tags.

*/
public String getQuickHelp();
}
3 changes: 2 additions & 1 deletion java/org/contikios/cooja/Mote.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
public interface Mote {

/**
* @return Unique mote ID
* Returns unique mote ID.

*/
public int getID();

Expand Down
6 changes: 4 additions & 2 deletions java/org/contikios/cooja/MoteInterfaceHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,8 @@ public IPAddress getIPAddress() {
}

/**
* @return Rime address interface
* Returns rime address interface.

*/
public RimeAddress getRimeAddress() {
if (myRimeAddress == null) {
Expand Down Expand Up @@ -349,7 +350,8 @@ public void doPassiveActionsAfterTick() {
}

/**
* @return Mote interfaces
* Returns mote interfaces.

*/
public Collection<MoteInterface> getInterfaces() {
return moteInterfaces;
Expand Down
20 changes: 12 additions & 8 deletions java/org/contikios/cooja/MoteType.java
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,9 @@ public interface MoteType {
public File getContikiSourceFile();

/**
* @param file Contiki main process source file.
* @see #getContikiSourceFile()
*See {@link #getContikiSourceFile()}.
@param file Contiki main process source file.
*
*/
public void setContikiSourceFile(File file);

Expand All @@ -108,8 +109,9 @@ public interface MoteType {
public File getContikiFirmwareFile();

/**
* @param file Contiki firmware file or library.
* @see #getContikiFirmwareFile()
*See {@link #getContikiFirmwareFile()}.
@param file Contiki firmware file or library.
*
*/
public void setContikiFirmwareFile(File file);

Expand All @@ -125,14 +127,16 @@ public interface MoteType {
public String getCompileCommands();

/**
* @param commands Compile commands
* @see #getCompileCommands()
*See {@link #getCompileCommands()}.
@param commands Compile commands
*
*/
public void setCompileCommands(String commands);

/**
* @return Mote interface classes of mote type.
* @see #setMoteInterfaceClasses(Class[])
*See {@link #setMoteInterfaceClasses(Class[])}.
@return Mote interface classes of mote type.
*
*/
public Class<? extends MoteInterface>[] getMoteInterfaceClasses();

Expand Down
3 changes: 2 additions & 1 deletion java/org/contikios/cooja/ProjectConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,8 @@ public boolean appendConfig(ProjectConfig config) {
}

/**
* @return All property names in configuration
* Returns all property names in configuration.

*/
public Enumeration<String> getPropertyNames() {
return (Enumeration<String>) myConfig.propertyNames();
Expand Down
39 changes: 24 additions & 15 deletions java/org/contikios/cooja/RadioConnection.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,16 @@ public RadioConnection(Radio sourceRadio) {
}

/**
* @return Radio connection start time
* Returns radio connection start time.

*/
public long getStartTime() {
return startTime;
}

/**
* @return Start time of ongoing reception
* Returns start time of ongoing reception.

*/
public long getReceptionStartTime() {
/* TODO XXX: This may currently return the start time of an ongoing
Expand Down Expand Up @@ -144,8 +146,9 @@ public void addDestination(Radio radio, Long delay) {
}

/**
* @param radio Radio
* @return Radio propagation delay (us)
* Returns radio propagation delay (us).
@param radio Radio
*
*/
public long getDestinationDelay(Radio radio) {
int idx = allDestinations.indexOf(radio);
Expand Down Expand Up @@ -179,47 +182,53 @@ public void addInterfered(Radio radio) {
}

/**
* @param radio Radio
* @return True if radio is a non-interfered destination in this connection
* Returns true if radio is a non-interfered destination in this connection.
@param radio Radio
*
*/
public boolean isDestination(Radio radio) {
return destinationsNonInterfered.contains(radio);
}

/**
* @param radio Radio
* @return True if radio is interfered in this connection
* Returns true if radio is interfered in this connection.
@param radio Radio
*
*/
public boolean isInterfered(Radio radio) {
return allInterfered.contains(radio);
}

/**
* @return Source radio
* Returns source radio.

*/
public Radio getSource() {
return source;
}

/**
* @see #getAllDestinations()
* @return All non-interfered destinations
* Returns all non-interfered destinations.
@see #getAllDestinations()
*
*/
public Radio[] getDestinations() {
return destinationsNonInterfered.toArray(new Radio[0]);
}

/**
* @see #getDestinations()
* @return All destination radios, including radios that became
* interfered after the connection started.
* Returns all destination radios, including radios that became
interfered after the connection started.
@see #getDestinations()
*
*/
public Radio[] getAllDestinations() {
return allDestinations.toArray(new Radio[0]);
}

/**
* @return All radios interfered by this connection, including destinations
* Returns all radios interfered by this connection, including destinations.

*/
public Radio[] getInterfered() {
return allInterfered.toArray(new Radio[0]);
Expand Down
6 changes: 4 additions & 2 deletions java/org/contikios/cooja/RadioMedium.java
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ public abstract class RadioMedium {
public abstract void addRadioTransmissionObserver(Observer observer);

/**
* @return Radio medium observable
* Returns radio medium observable.

*/
public abstract Observable getRadioTransmissionObservable();

Expand All @@ -120,7 +121,8 @@ public abstract class RadioMedium {
public abstract void deleteRadioTransmissionObserver(Observer observer);

/**
* @return Last radio connection finished in the radio medium
* Returns last radio connection finished in the radio medium.

*/
public abstract RadioConnection getLastConnection();

Expand Down
3 changes: 2 additions & 1 deletion java/org/contikios/cooja/RadioPacket.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
public interface RadioPacket {

/**
* @return Packet data
* Returns packet data.

*/
public byte[] getPacketData();

Expand Down
Loading