diff --git a/pi4j-core/src/main/java/com/pi4j/Pi4J.java b/pi4j-core/src/main/java/com/pi4j/Pi4J.java index 1a968ef4..fe0889ed 100644 --- a/pi4j-core/src/main/java/com/pi4j/Pi4J.java +++ b/pi4j-core/src/main/java/com/pi4j/Pi4J.java @@ -34,12 +34,6 @@ import java.io.InputStream; import java.util.Properties; -/** - *

Pi4J class.

- * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id - */ public class Pi4J { private static final Logger logger = LoggerFactory.getLogger(Pi4J.class); @@ -109,17 +103,12 @@ public void log() { } } - /** - * @return {@link BuildInfo} - */ public static BuildInfo getBuildInfo() { return buildInfo; } /** * Reads the build info from the build.properties file. - * - * @return {@link BuildInfo} */ private static BuildInfo loadBuildInfo() { try (InputStream is = Pi4J.class.getResourceAsStream("/build.properties")) { diff --git a/pi4j-core/src/main/java/com/pi4j/boardinfo/util/PwmChipUtil.java b/pi4j-core/src/main/java/com/pi4j/boardinfo/util/PwmChipUtil.java index d9f4f223..666f29e4 100644 --- a/pi4j-core/src/main/java/com/pi4j/boardinfo/util/PwmChipUtil.java +++ b/pi4j-core/src/main/java/com/pi4j/boardinfo/util/PwmChipUtil.java @@ -77,7 +77,7 @@ public class PwmChipUtil { *
  • System with RP1 (RPi 5 and later): as detected or {@link #DEFAULT_RP1_PWM_CHIP}
  • * * - * @return {@link int} value for the pwmchip + * @return {@code int} value for the pwmchip */ public static int getPWMChip() { if (!BoardInfoHelper.usesRP1()) { @@ -89,7 +89,7 @@ public static int getPWMChip() { /** * getPWMChipForRP1 using the default PWM system path * - * @return {@link int} value for the pwmchip if configured, + * @return {@code int} value for the pwmchip if configured, * else defaults to original expected value defined by {@link #DEFAULT_RP1_PWM_CHIP}. */ public static int getPWMChipForRP1() { @@ -100,7 +100,7 @@ public static int getPWMChipForRP1() { * getPWMChipForRP1 * * @param pwmFileSystemPath Device tree path to PWM chips, typically /sys/class/pwm - * @return {@link int} value for the pwmchip if configured, + * @return {@code int} value for the pwmchip if configured, * else defaults to original expected value of defined by {@link #DEFAULT_RP1_PWM_CHIP}. */ public static int getPWMChipForRP1(String pwmFileSystemPath) { diff --git a/pi4j-core/src/main/java/com/pi4j/common/Describable.java b/pi4j-core/src/main/java/com/pi4j/common/Describable.java index c6594a32..d9533e67 100644 --- a/pi4j-core/src/main/java/com/pi4j/common/Describable.java +++ b/pi4j-core/src/main/java/com/pi4j/common/Describable.java @@ -25,17 +25,6 @@ * #L% */ -/** - *

    Describable interface.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id - */ public interface Describable { - /** - *

    describe.

    - * - * @return a {@link com.pi4j.common.Descriptor} object. - */ Descriptor describe(); } diff --git a/pi4j-core/src/main/java/com/pi4j/common/Descriptor.java b/pi4j-core/src/main/java/com/pi4j/common/Descriptor.java index 4e34949b..6bf99f6e 100644 --- a/pi4j-core/src/main/java/com/pi4j/common/Descriptor.java +++ b/pi4j-core/src/main/java/com/pi4j/common/Descriptor.java @@ -29,161 +29,50 @@ import java.io.PrintStream; -/** - *

    Descriptor interface.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id - */ public interface Descriptor { - /** - *

    id.

    - * - * @param id a {@link java.lang.String} object. - * @return a {@link com.pi4j.common.Descriptor} object. - */ Descriptor id(String id); - /** - *

    name.

    - * - * @param name a {@link java.lang.String} object. - * @return a {@link com.pi4j.common.Descriptor} object. - */ + Descriptor name(String name); - /** - *

    description.

    - * - * @param description a {@link java.lang.String} object. - * @return a {@link com.pi4j.common.Descriptor} object. - */ + Descriptor description(String description); - /** - *

    category.

    - * - * @param category a {@link java.lang.String} object. - * @return a {@link com.pi4j.common.Descriptor} object. - */ + Descriptor category(String category); - /** - *

    quantity.

    - * - * @param quantity a {@link java.lang.Integer} object. - * @return a {@link com.pi4j.common.Descriptor} object. - */ + Descriptor quantity(Integer quantity); - /** - *

    type.

    - * - * @param type a {@link java.lang.Class} object. - * @return a {@link com.pi4j.common.Descriptor} object. - */ + Descriptor type(Class type); - /** - *

    parent.

    - * - * @param parent a {@link com.pi4j.common.Descriptor} object. - * @return a {@link com.pi4j.common.Descriptor} object. - */ Descriptor parent(Descriptor parent); - /** - *

    value.

    - * - * @param value a {@link java.lang.Object} object. - * @return a {@link com.pi4j.common.Descriptor} object. - */ Descriptor value(Object value); - /** - *

    id.

    - * - * @return a {@link java.lang.String} object. - */ String id(); - /** - *

    name.

    - * - * @return a {@link java.lang.String} object. - */ + String name(); - /** - *

    category.

    - * - * @return a {@link java.lang.String} object. - */ + String category(); - /** - *

    description.

    - * - * @return a {@link java.lang.String} object. - */ + String description(); - /** - *

    quantity.

    - * - * @return a {@link java.lang.Integer} object. - */ + Integer quantity(); - /** - *

    value.

    - * - * @return a {@link java.lang.Object} object. - */ + Object value(); - /** - *

    type.

    - * - * @return a {@link java.lang.Class} object. - */ + Class type(); - /** - *

    parent.

    - * - * @return a {@link com.pi4j.common.Descriptor} object. - */ + Descriptor parent(); - /** - *

    create.

    - * - * @return a {@link com.pi4j.common.Descriptor} object. - */ - static Descriptor create(){ + static Descriptor create() { return new DescriptorImpl(); } - /** - *

    add.

    - * - * @param descriptor a {@link com.pi4j.common.Descriptor} object. - * @return a {@link com.pi4j.common.Descriptor} object. - */ Descriptor add(Descriptor descriptor); - /** - *

    size.

    - * - * @return a int. - */ int size(); - /** - *

    isEmpty.

    - * - * @return a boolean. - */ + boolean isEmpty(); - /** - *

    isNotEmpty.

    - * - * @return a boolean. - */ + boolean isNotEmpty(); - /** - *

    print.

    - * - * @param stream a {@link java.io.PrintStream} object. - */ void print(PrintStream stream); } diff --git a/pi4j-core/src/main/java/com/pi4j/common/Identity.java b/pi4j-core/src/main/java/com/pi4j/common/Identity.java index aa482a2f..68b802c8 100644 --- a/pi4j-core/src/main/java/com/pi4j/common/Identity.java +++ b/pi4j-core/src/main/java/com/pi4j/common/Identity.java @@ -25,80 +25,36 @@ * #L% */ -/** - *

    Identity interface.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id - */ public interface Identity extends Describable { - /** - *

    id.

    - * - * @return a {@link java.lang.String} object. - */ String id(); - /** - *

    name.

    - * - * @return a {@link java.lang.String} object. - */ + String name(); - /** - *

    description.

    - * - * @return a {@link java.lang.String} object. - */ + String description(); - /** - *

    metadata.

    - * - * @return a {@link com.pi4j.common.Metadata} object. - */ + Metadata metadata(); - /** - *

    getId.

    - * - * @return a {@link java.lang.String} object. - */ - default String getId(){ + default String getId() { return id(); } - /** - *

    getName.

    - * - * @return a {@link java.lang.String} object. - */ - default String getName(){ + default String getName() { return name(); } - /** - *

    getDescription.

    - * - * @return a {@link java.lang.String} object. - */ - default String getDescription(){ + default String getDescription() { return description(); } - /** - *

    getMetadata.

    - * - * @return a {@link com.pi4j.common.Metadata} object. - */ - default Metadata getMetadata(){ + default Metadata getMetadata() { return metadata(); } - /** {@inheritDoc} */ @Override default Descriptor describe() { return Descriptor.create() - .id(id()) - .name(name()) - .description(description()); + .id(id()) + .name(name()) + .description(description()); } } diff --git a/pi4j-core/src/main/java/com/pi4j/common/IdentityBase.java b/pi4j-core/src/main/java/com/pi4j/common/IdentityBase.java index 105d0272..fbbc3e2a 100644 --- a/pi4j-core/src/main/java/com/pi4j/common/IdentityBase.java +++ b/pi4j-core/src/main/java/com/pi4j/common/IdentityBase.java @@ -10,7 +10,7 @@ * This file is part of the Pi4J project. More information about * this project can be found here: https://pi4j.com/ * ********************************************************************** - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -29,13 +29,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -/** - *

    Abstract IdentityBase class.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id - * @param - */ public abstract class IdentityBase implements Extension { protected Logger logger = LoggerFactory.getLogger(this.getClass()); @@ -45,67 +38,42 @@ public abstract class IdentityBase implements Extension { protected String description; protected Metadata metadata = Metadata.create(); - /** - *

    Constructor for IdentityBase.

    - */ - public IdentityBase(){ + public IdentityBase() { this.id = getClass().getName(); this.name = this.getClass().getSimpleName(); this.description = this.getClass().getName(); } - /** - *

    Constructor for IdentityBase.

    - * - * @param id a {@link java.lang.String} object. - */ - public IdentityBase(String id){ + public IdentityBase(String id) { this(); this.id = id; } - /** - *

    Constructor for IdentityBase.

    - * - * @param id a {@link java.lang.String} object. - * @param name a {@link java.lang.String} object. - */ - public IdentityBase(String id, String name){ + public IdentityBase(String id, String name) { this(id); this.name = name; } - /** - *

    Constructor for IdentityBase.

    - * - * @param id a {@link java.lang.String} object. - * @param name a {@link java.lang.String} object. - * @param description a {@link java.lang.String} object. - */ - public IdentityBase(String id, String name, String description){ + public IdentityBase(String id, String name, String description) { this(id, name); this.description = description; } - /** {@inheritDoc} */ @Override public String id() { return this.id; } - /** {@inheritDoc} */ @Override public String name() { return this.name; } - /** {@inheritDoc} */ @Override public String description() { return this.description; } - /** {@inheritDoc} */ @Override public Metadata metadata() { return this.metadata; diff --git a/pi4j-core/src/main/java/com/pi4j/common/Lifecycle.java b/pi4j-core/src/main/java/com/pi4j/common/Lifecycle.java index 18c2e9af..00897f6a 100644 --- a/pi4j-core/src/main/java/com/pi4j/common/Lifecycle.java +++ b/pi4j-core/src/main/java/com/pi4j/common/Lifecycle.java @@ -29,23 +29,9 @@ import com.pi4j.exception.InitializeException; import com.pi4j.exception.ShutdownException; -/** - *

    Lifecycle interface.

    - * - * @param - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id - */ public interface Lifecycle { /** - *

    initialize.

    - * - * @param context a {@link com.pi4j.context.Context} object. - * - * @return a T object. - * * @throws com.pi4j.exception.InitializeException if an error occurs during initialization. */ T initialize(Context context) throws InitializeException; @@ -55,10 +41,6 @@ public interface Lifecycle { * users directly. To shut down an IO instance, call close() instead. This will make sure that the * instance is not just shut down and closed but also properly unregistered.

    * - * @param context a {@link com.pi4j.context.Context} object. - * - * @return a T object. - * * @throws com.pi4j.exception.ShutdownException if an error occurs during shutdown. */ T shutdownInternal(Context context) throws ShutdownException; diff --git a/pi4j-core/src/main/java/com/pi4j/common/Metadata.java b/pi4j-core/src/main/java/com/pi4j/common/Metadata.java index 5794691d..165a74e2 100644 --- a/pi4j-core/src/main/java/com/pi4j/common/Metadata.java +++ b/pi4j-core/src/main/java/com/pi4j/common/Metadata.java @@ -30,13 +30,7 @@ import java.util.Collection; -/** - *

    Metadata interface.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id - */ -public interface Metadata { +public interface Metadata { // static Metadata create(){ // return new MetadataImpl(); @@ -54,143 +48,57 @@ public interface Metadata { // return create(key, value).description(description); // } - /** - *

    size.

    - * - * @return a int. - */ int size(); - /** - *

    isEmpty.

    - * - * @return a boolean. - */ + boolean isEmpty(); - /** - *

    contains.

    - * - * @param key a {@link java.lang.String} object. - * @return a boolean. - */ + boolean contains(String key); - /** - *

    remove.

    - * - * @param key a {@link java.lang.String} object. - * @return a {@link com.pi4j.common.Metadatum} object. - */ + Metadatum remove(String key); - /** - *

    put.

    - * - * @param metadatum a {@link com.pi4j.common.Metadatum} object. - * @return a {@link com.pi4j.common.Metadata} object. - */ Metadata put(Metadatum metadatum); - /** - *

    clear.

    - * - * @return a {@link com.pi4j.common.Metadata} object. - */ + Metadata clear(); - /** - *

    get.

    - * - * @param key a {@link java.lang.String} object. - * @return a {@link com.pi4j.common.Metadatum} object. - */ + Metadatum get(String key); - /** - *

    all.

    - * - * @return a {@link java.util.Collection} object. - */ + Collection all(); - /** - *

    put.

    - * - * @param c a {@link java.util.Collection} object. - * @return a {@link com.pi4j.common.Metadata} object. - */ - default Metadata put(Collection c){ - c.forEach((m)->{ + default Metadata put(Collection c) { + c.forEach((m) -> { put(m); }); return this; } - /** - *

    put.

    - * - * @param metadata a {@link com.pi4j.common.Metadata} object. - * @return a {@link com.pi4j.common.Metadata} object. - */ - default Metadata put(Metadata metadata){ - metadata.all().forEach((m)->{ + default Metadata put(Metadata metadata) { + metadata.all().forEach((m) -> { put(m); }); return this; } - /** - *

    contains.

    - * - * @param metadatum a {@link com.pi4j.common.Metadatum} object. - * @return a boolean. - */ - default boolean contains(Metadatum metadatum){ + default boolean contains(Metadatum metadatum) { return contains(metadatum.key()); } - /** - *

    getValue.

    - * - * @param key a {@link java.lang.String} object. - * @return a {@link java.lang.Object} object. - */ - default Object getValue(String key){ + default Object getValue(String key) { return get(key).value(); } - /** - *

    put.

    - * - * @param key a {@link java.lang.String} object. - * @return a {@link com.pi4j.common.Metadata} object. - */ - default Metadata put(String key){ + default Metadata put(String key) { return put(Metadatum.create(key)); } - /** - *

    put.

    - * - * @param key a {@link java.lang.String} object. - * @param value a {@link java.lang.Object} object. - * @return a {@link com.pi4j.common.Metadata} object. - */ - default Metadata put(String key, Object value){ + + default Metadata put(String key, Object value) { return put(Metadatum.create(key, value)); } - /** - *

    put.

    - * - * @param key a {@link java.lang.String} object. - * @param value a {@link java.lang.Object} object. - * @param description a {@link java.lang.String} object. - * @return a {@link com.pi4j.common.Metadata} object. - */ - default Metadata put(String key, Object value, String description){ + + default Metadata put(String key, Object value, String description) { return put(Metadatum.create(key, value, description)); } - /** - *

    create.

    - * - * @return a {@link com.pi4j.common.Metadata} object. - */ - static Metadata create(){ + static Metadata create() { return new MetadataImpl(); } } diff --git a/pi4j-core/src/main/java/com/pi4j/common/Metadatum.java b/pi4j-core/src/main/java/com/pi4j/common/Metadatum.java index 07838094..e5cad995 100644 --- a/pi4j-core/src/main/java/com/pi4j/common/Metadatum.java +++ b/pi4j-core/src/main/java/com/pi4j/common/Metadatum.java @@ -27,97 +27,36 @@ import com.pi4j.common.impl.MetadatumImpl; -/** - *

    Metadatum interface.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id - */ public interface Metadatum extends Describable { - /** - *

    key.

    - * - * @param key a {@link java.lang.String} object. - * @return a {@link com.pi4j.common.Metadatum} object. - */ Metadatum key(String key); - /** - *

    value.

    - * - * @param value a {@link java.lang.Object} object. - * @return a {@link com.pi4j.common.Metadatum} object. - */ + Metadatum value(Object value); - /** - *

    description.

    - * - * @param description a {@link java.lang.String} object. - * @return a {@link com.pi4j.common.Metadatum} object. - */ + Metadatum description(String description); - /** - *

    key.

    - * - * @return a {@link java.lang.String} object. - */ + String key(); - /** - *

    value.

    - * - * @return a {@link java.lang.Object} object. - */ + Object value(); - /** - *

    description.

    - * - * @return a {@link java.lang.String} object. - */ + String description(); - /** - *

    create.

    - * - * @return a {@link com.pi4j.common.Metadatum} object. - */ - static Metadatum create(){ + static Metadatum create() { return new MetadatumImpl(); } - /** - *

    create.

    - * - * @param key a {@link java.lang.String} object. - * @return a {@link com.pi4j.common.Metadatum} object. - */ - static Metadatum create(String key){ + static Metadatum create(String key) { return create().key(key); } - /** - *

    create.

    - * - * @param key a {@link java.lang.String} object. - * @param value a {@link java.lang.Object} object. - * @return a {@link com.pi4j.common.Metadatum} object. - */ - static Metadatum create(String key, Object value){ + static Metadatum create(String key, Object value) { return create(key).value(value); } - /** - *

    create.

    - * - * @param key a {@link java.lang.String} object. - * @param value a {@link java.lang.Object} object. - * @param description a {@link java.lang.String} object. - * @return a {@link com.pi4j.common.Metadatum} object. - */ - static Metadatum create(String key, Object value, String description){ + static Metadatum create(String key, Object value, String description) { return create(key, value).description(description); } - /** {@inheritDoc} */ @Override default Descriptor describe() { return Descriptor.create().name(key()).description(description()).value(value()); diff --git a/pi4j-core/src/main/java/com/pi4j/common/impl/DescriptorImpl.java b/pi4j-core/src/main/java/com/pi4j/common/impl/DescriptorImpl.java index 26b55690..9a7c7ab2 100644 --- a/pi4j-core/src/main/java/com/pi4j/common/impl/DescriptorImpl.java +++ b/pi4j-core/src/main/java/com/pi4j/common/impl/DescriptorImpl.java @@ -34,12 +34,6 @@ import java.util.Set; import java.util.stream.Collectors; -/** - *

    DescriptorImpl class.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id - */ public class DescriptorImpl implements Descriptor { private Set children = Collections.synchronizedSet(new LinkedHashSet()); @@ -53,118 +47,98 @@ public class DescriptorImpl implements Descriptor { private Class type; private Object value; - /** - *

    Constructor for DescriptorImpl.

    - */ public DescriptorImpl(){ this.parent = null; } - /** {@inheritDoc} */ @Override public Descriptor id(String id) { this.id = id; return this; } - /** {@inheritDoc} */ @Override public Descriptor name(String name) { this.name = name; return this; } - /** {@inheritDoc} */ @Override public Descriptor description(String description) { this.description = description; return this; } - /** {@inheritDoc} */ @Override public Descriptor category(String category) { this.category = category; return this; } - /** {@inheritDoc} */ @Override public Descriptor quantity(Integer quantity) { this.quantity = quantity; return this; } - /** {@inheritDoc} */ @Override public Descriptor value(Object value) { this.value = value; return this; } - /** {@inheritDoc} */ @Override public Descriptor type(Class type) { this.type = type; return this; } - /** {@inheritDoc} */ @Override public Descriptor parent(Descriptor parent) { this.parent = parent; return this; } - /** {@inheritDoc} */ @Override public String id() { return this.id; } - /** {@inheritDoc} */ @Override public String name() { return this.name; } - /** {@inheritDoc} */ @Override public String description() { return this.description; } - /** {@inheritDoc} */ @Override public String category() { return this.category; } - /** {@inheritDoc} */ @Override public Integer quantity() { return this.quantity; } - /** {@inheritDoc} */ @Override public Object value() { return this.value; } - /** {@inheritDoc} */ @Override public Class type() { return this.type; } - /** {@inheritDoc} */ @Override public Descriptor parent() { return this.parent; } - /** {@inheritDoc} */ @Override public Descriptor add(Descriptor descriptor) { if(descriptor != null) { @@ -173,34 +147,18 @@ public Descriptor add(Descriptor descriptor) { return this; } - /** - *

    size.

    - * - * @return a int. - */ public int size(){ return children.size(); } - /** - *

    isEmpty.

    - * - * @return a boolean. - */ public boolean isEmpty(){ return children.isEmpty(); } - /** - *

    isNotEmpty.

    - * - * @return a boolean. - */ public boolean isNotEmpty(){ return !children.isEmpty(); } - /** {@inheritDoc} */ public void print(PrintStream stream){ print(stream, "", new ArrayList<>()); } diff --git a/pi4j-core/src/main/java/com/pi4j/common/impl/MetadataImpl.java b/pi4j-core/src/main/java/com/pi4j/common/impl/MetadataImpl.java index 5e735739..5afc1dd8 100644 --- a/pi4j-core/src/main/java/com/pi4j/common/impl/MetadataImpl.java +++ b/pi4j-core/src/main/java/com/pi4j/common/impl/MetadataImpl.java @@ -33,61 +33,47 @@ import java.util.LinkedHashMap; import java.util.Map; -/** - *

    MetadataImpl class.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id - */ public class MetadataImpl implements Metadata { private Map metadata = Collections.synchronizedMap(new LinkedHashMap<>()); - /** {@inheritDoc} */ @Override public int size() { return this.metadata.size(); } - /** {@inheritDoc} */ @Override public boolean isEmpty() { return this.metadata.isEmpty(); } - /** {@inheritDoc} */ @Override public boolean contains(String key) { return this.metadata.containsKey(key); } - /** {@inheritDoc} */ @Override public Metadata put(Metadatum metadatum) { this.metadata.put(metadatum.key(), metadatum); return this; } - /** {@inheritDoc} */ @Override public Metadatum remove(String key) { return this.metadata.remove(key); } - /** {@inheritDoc} */ @Override public Metadata clear() { this.metadata.clear(); return this; } - /** {@inheritDoc} */ @Override public Metadatum get(String key) { return this.metadata.get(key); } - /** {@inheritDoc} */ @Override public Collection all() { return this.metadata.values(); diff --git a/pi4j-core/src/main/java/com/pi4j/common/impl/MetadatumImpl.java b/pi4j-core/src/main/java/com/pi4j/common/impl/MetadatumImpl.java index efc3760e..95d2d12e 100644 --- a/pi4j-core/src/main/java/com/pi4j/common/impl/MetadatumImpl.java +++ b/pi4j-core/src/main/java/com/pi4j/common/impl/MetadatumImpl.java @@ -27,58 +27,45 @@ import com.pi4j.common.Metadatum; -/** - *

    MetadatumImpl class.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id - */ public class MetadatumImpl implements Metadatum { private String key; private Object value; private String description; - /** {@inheritDoc} */ @Override public MetadatumImpl key(String key) { this.key = key; return this; } - /** {@inheritDoc} */ @Override public MetadatumImpl value(Object value) { this.value = value; return this; } - /** {@inheritDoc} */ @Override public MetadatumImpl description(String description) { this.description = description; return this; } - /** {@inheritDoc} */ @Override public String key() { return this.key; } - /** {@inheritDoc} */ @Override public Object value() { return this.value; } - /** {@inheritDoc} */ @Override public String description() { return this.description; } - /** {@inheritDoc} */ @Override public String toString(){ return key() + " = " + value().toString(); diff --git a/pi4j-core/src/main/java/com/pi4j/config/BcmConfig.java b/pi4j-core/src/main/java/com/pi4j/config/BcmConfig.java index 7a0cf82e..8165bfd9 100644 --- a/pi4j-core/src/main/java/com/pi4j/config/BcmConfig.java +++ b/pi4j-core/src/main/java/com/pi4j/config/BcmConfig.java @@ -29,8 +29,6 @@ *

    BcmConfig interface.

    * * @param - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface BcmConfig extends Config { /** @@ -47,9 +45,6 @@ public interface BcmConfig extends Configaddress.

    - * - * @return a {@link java.lang.Integer} object. * @deprecated use {@link #bcm()} instead. *

    * Since "address" has lead to many confusions while configuring IOs, @@ -60,9 +55,6 @@ public interface BcmConfig extends ConfiggetAddress.

    - * - * @return a {@link java.lang.Integer} object. * @deprecated use {@link #getBcm()} instead. *

    * Since "address" has lead to many confusions while configuring IOs, @@ -79,18 +71,8 @@ default Integer getAddress() { */ String BCM_KEY = "bcm"; - /** - *

    pin.

    - * - * @return a {@link Integer} object. - */ Integer bcm(); - /** - *

    getBcm.

    - * - * @return a {@link Integer} object. - */ default Integer getBcm() { return this.bcm(); } diff --git a/pi4j-core/src/main/java/com/pi4j/config/BcmConfigBuilder.java b/pi4j-core/src/main/java/com/pi4j/config/BcmConfigBuilder.java index 26b17894..1b52bde5 100644 --- a/pi4j-core/src/main/java/com/pi4j/config/BcmConfigBuilder.java +++ b/pi4j-core/src/main/java/com/pi4j/config/BcmConfigBuilder.java @@ -30,15 +30,9 @@ * * @param * @param - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface BcmConfigBuilder extends ConfigBuilder { /** - *

    address.

    - * - * @param address a {@link java.lang.Integer} object. - * @return a BUILDER_TYPE object. * @deprecated use {@link #bcm(Integer)} instead. *

    */ @@ -47,9 +41,6 @@ public interface BcmConfigBuilder extends ConfigBuild /** *

    pin defined by BCM number.

    - * - * @param bcm a {@link java.lang.Integer} object. - * @return a BUILDER_TYPE object. */ BUILDER_TYPE bcm(Integer bcm); } diff --git a/pi4j-core/src/main/java/com/pi4j/config/Builder.java b/pi4j-core/src/main/java/com/pi4j/config/Builder.java index 8492f995..03e495ad 100644 --- a/pi4j-core/src/main/java/com/pi4j/config/Builder.java +++ b/pi4j-core/src/main/java/com/pi4j/config/Builder.java @@ -28,15 +28,8 @@ /** *

    Builder interface.

    * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id * @param */ public interface Builder { - /** - *

    build.

    - * - * @return a BUILT_TYPE object. - */ BUILT_TYPE build(); } diff --git a/pi4j-core/src/main/java/com/pi4j/config/BusConfig.java b/pi4j-core/src/main/java/com/pi4j/config/BusConfig.java index bfac6a98..fde58da4 100644 --- a/pi4j-core/src/main/java/com/pi4j/config/BusConfig.java +++ b/pi4j-core/src/main/java/com/pi4j/config/BusConfig.java @@ -29,8 +29,6 @@ *

    BusConfig interface.

    * * @param - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface BusConfig extends Config { /** @@ -38,18 +36,8 @@ public interface BusConfig extends Configbus.

    - * - * @return a {@link Integer} object. - */ Integer bus(); - /** - *

    getBus.

    - * - * @return a {@link Integer} object. - */ default Integer getBus() { return this.bus(); } diff --git a/pi4j-core/src/main/java/com/pi4j/config/BusConfigBuilder.java b/pi4j-core/src/main/java/com/pi4j/config/BusConfigBuilder.java index 673fbf9e..ecec4309 100644 --- a/pi4j-core/src/main/java/com/pi4j/config/BusConfigBuilder.java +++ b/pi4j-core/src/main/java/com/pi4j/config/BusConfigBuilder.java @@ -30,15 +30,7 @@ * * @param * @param - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface BusConfigBuilder extends ConfigBuilder { - /** - *

    bus.

    - * - * @param bus a {@link Integer} object. - * @return a BUILDER_TYPE object. - */ BUILDER_TYPE bus(Integer bus); } diff --git a/pi4j-core/src/main/java/com/pi4j/config/ChannelConfig.java b/pi4j-core/src/main/java/com/pi4j/config/ChannelConfig.java index e12880de..4e88dfa2 100644 --- a/pi4j-core/src/main/java/com/pi4j/config/ChannelConfig.java +++ b/pi4j-core/src/main/java/com/pi4j/config/ChannelConfig.java @@ -29,8 +29,6 @@ *

    ChannelConfig interface.

    * * @param - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface ChannelConfig extends Config { /** @@ -38,18 +36,8 @@ public interface ChannelConfig extends Configpin.

    - * - * @return a {@link Integer} object. - */ Integer channel(); - /** - *

    getChannel.

    - * - * @return a {@link Integer} object. - */ default Integer getChannel() { return this.channel(); } diff --git a/pi4j-core/src/main/java/com/pi4j/config/ChannelConfigBuilder.java b/pi4j-core/src/main/java/com/pi4j/config/ChannelConfigBuilder.java index a828a9ed..3507db39 100644 --- a/pi4j-core/src/main/java/com/pi4j/config/ChannelConfigBuilder.java +++ b/pi4j-core/src/main/java/com/pi4j/config/ChannelConfigBuilder.java @@ -30,15 +30,7 @@ * * @param * @param - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface ChannelConfigBuilder extends ConfigBuilder { - /** - *

    channel.

    - * - * @param channel a {@link Integer} object. - * @return a BUILDER_TYPE object. - */ BUILDER_TYPE channel(Integer channel); } diff --git a/pi4j-core/src/main/java/com/pi4j/config/ChipConfig.java b/pi4j-core/src/main/java/com/pi4j/config/ChipConfig.java index 86ff1609..5bb29f61 100644 --- a/pi4j-core/src/main/java/com/pi4j/config/ChipConfig.java +++ b/pi4j-core/src/main/java/com/pi4j/config/ChipConfig.java @@ -29,8 +29,6 @@ *

    ChipConfig interface.

    * * @param - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface ChipConfig extends Config { /** @@ -38,18 +36,8 @@ public interface ChipConfig extends Configchip.

    - * - * @return a {@link Integer} object. - */ Integer chip(); - /** - *

    getChip.

    - * - * @return a {@link Integer} object. - */ default Integer getChip() { return this.chip(); } diff --git a/pi4j-core/src/main/java/com/pi4j/config/ChipConfigBuilder.java b/pi4j-core/src/main/java/com/pi4j/config/ChipConfigBuilder.java index 94d2a9c2..977dbe6b 100644 --- a/pi4j-core/src/main/java/com/pi4j/config/ChipConfigBuilder.java +++ b/pi4j-core/src/main/java/com/pi4j/config/ChipConfigBuilder.java @@ -30,15 +30,7 @@ * * @param * @param - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface ChipConfigBuilder extends ConfigBuilder { - /** - *

    chip.

    - * - * @param chip a {@link Integer} object. - * @return a BUILDER_TYPE object. - */ BUILDER_TYPE chip(Integer chip); } diff --git a/pi4j-core/src/main/java/com/pi4j/config/Config.java b/pi4j-core/src/main/java/com/pi4j/config/Config.java index 54095ba2..4e3ba3c0 100644 --- a/pi4j-core/src/main/java/com/pi4j/config/Config.java +++ b/pi4j-core/src/main/java/com/pi4j/config/Config.java @@ -31,8 +31,6 @@ *

    Config interface.

    * * @param - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface Config { /** @@ -55,55 +53,22 @@ public interface Config { */ Map properties(); - /** - *

    id.

    - * - * @return a {@link java.lang.String} object. - */ String id(); - /** - *

    name.

    - * - * @return a {@link java.lang.String} object. - */ String name(); - /** - *

    description.

    - * - * @return a {@link java.lang.String} object. - */ String description(); - /** - *

    validate.

    - */ void validate(); - /** - *

    getId.

    - * - * @return a {@link java.lang.String} object. - */ default String getId() { return this.id(); } - /** - *

    getName.

    - * - * @return a {@link java.lang.String} object. - */ default String getName() { return this.name(); } - /** - *

    getDescription.

    - * - * @return a {@link java.lang.String} object. - */ default String getDescription() { return this.description(); } diff --git a/pi4j-core/src/main/java/com/pi4j/config/ConfigBase.java b/pi4j-core/src/main/java/com/pi4j/config/ConfigBase.java index 26913e04..781b74fd 100644 --- a/pi4j-core/src/main/java/com/pi4j/config/ConfigBase.java +++ b/pi4j-core/src/main/java/com/pi4j/config/ConfigBase.java @@ -33,11 +33,7 @@ import java.util.Map; /** - *

    ConfigBase class.

    - * * @param - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public class ConfigBase implements Config { @@ -55,8 +51,6 @@ protected ConfigBase() { /** * PRIVATE CONSTRUCTOR - * - * @param properties a {@link java.util.Map} object. */ protected ConfigBase(Map properties) { // add all properties to this config object @@ -75,41 +69,26 @@ protected ConfigBase(Map properties) { this.description = properties.get(DESCRIPTION_KEY); } - /** - * {@inheritDoc} - */ @Override public Map properties() { return Collections.unmodifiableMap(this.properties); } - /** - * {@inheritDoc} - */ @Override public String id() { return this.id; } - /** - * {@inheritDoc} - */ @Override public String name() { return this.name; } - /** - * {@inheritDoc} - */ @Override public String description() { return this.description; } - /** - * {@inheritDoc} - */ @Override public void validate() { if (StringUtil.isNullOrEmpty(this.id)) { @@ -117,9 +96,6 @@ public void validate() { } } - /** - * {@inheritDoc} - */ @Override public int getUniqueIdentifier() { return 0; diff --git a/pi4j-core/src/main/java/com/pi4j/config/ConfigBuilder.java b/pi4j-core/src/main/java/com/pi4j/config/ConfigBuilder.java index 9253c514..d202b89d 100644 --- a/pi4j-core/src/main/java/com/pi4j/config/ConfigBuilder.java +++ b/pi4j-core/src/main/java/com/pi4j/config/ConfigBuilder.java @@ -35,115 +35,42 @@ /** *

    ConfigBuilder interface.

    * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id * @param * @param */ public interface ConfigBuilder extends Builder { - /** - *

    id.

    - * - * @param id a {@link java.lang.String} object. - * @return a BUILDER_TYPE object. - */ BUILDER_TYPE id(String id); String id(); - /** - *

    name.

    - * - * @param name a {@link java.lang.String} object. - * @return a BUILDER_TYPE object. - */ BUILDER_TYPE name(String name); - /** - *

    description.

    - * - * @param description a {@link java.lang.String} object. - * @return a BUILDER_TYPE object. - */ BUILDER_TYPE description(String description); - /** - *

    load.

    - * - * @param properties a {@link java.util.Map} object. - * @return a BUILDER_TYPE object. - */ BUILDER_TYPE load(Map properties); - /** - *

    load.

    - * - * @param properties a {@link java.util.Properties} object. - * @return a BUILDER_TYPE object. - */ BUILDER_TYPE load(Properties properties); - /** - *

    load.

    - * - * @param properties a {@link java.util.Map} object. - * @param prefixFilter a {@link java.lang.String} object. - * @return a BUILDER_TYPE object. - */ BUILDER_TYPE load(Map properties, String prefixFilter); - /** - *

    load.

    - * - * @param properties a {@link java.util.Properties} object. - * @param prefixFilter a {@link java.lang.String} object. - * @return a BUILDER_TYPE object. - */ BUILDER_TYPE load(Properties properties, String prefixFilter); /** - *

    load.

    - * - * @param stream a {@link java.io.InputStream} object. - * @return a BUILDER_TYPE object. * @throws java.io.IOException if an error occurs accessing {@code stream}. */ BUILDER_TYPE load(InputStream stream) throws IOException; /** - *

    load.

    - * - * @param stream a {@link java.io.InputStream} object. - * @param prefixFilter a {@link java.lang.String} object. - * @return a BUILDER_TYPE object. * @throws java.io.IOException if an error occurs accessing {@code stream}. */ BUILDER_TYPE load(InputStream stream, String prefixFilter) throws IOException; /** - *

    load.

    - * - * @param reader a {@link java.io.Reader} object. - * @return a BUILDER_TYPE object. * @throws java.io.IOException if an error occurs accessing {@code reader}. */ BUILDER_TYPE load(Reader reader) throws IOException; /** - *

    load.

    - * - * @param reader a {@link java.io.Reader} object. - * @param prefixFilter a {@link java.lang.String} object. - * @return a BUILDER_TYPE object. * @throws java.io.IOException if an error occurs accessing {@code reader}. */ BUILDER_TYPE load(Reader reader, String prefixFilter) throws IOException; /** - *

    load.

    - * - * @param file a {@link java.io.File} object. - * @return a BUILDER_TYPE object. * @throws java.io.IOException if an error occurs accessing {@code file}. */ BUILDER_TYPE load(File file) throws IOException; /** - *

    load.

    - * - * @param file a {@link java.io.File} object. - * @param prefixFilter a {@link java.lang.String} object. - * @return a BUILDER_TYPE object. * @throws java.io.IOException if an error occurs accessing {@code file}. */ BUILDER_TYPE load(File file, String prefixFilter) throws IOException; diff --git a/pi4j-core/src/main/java/com/pi4j/config/DeviceConfig.java b/pi4j-core/src/main/java/com/pi4j/config/DeviceConfig.java index f6dc9f18..94a3d752 100644 --- a/pi4j-core/src/main/java/com/pi4j/config/DeviceConfig.java +++ b/pi4j-core/src/main/java/com/pi4j/config/DeviceConfig.java @@ -29,8 +29,6 @@ *

    DeviceConfig interface.

    * * @param - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface DeviceConfig extends Config { @@ -39,18 +37,8 @@ public interface DeviceConfig extends Configdevice.

    - * - * @return a {@link java.lang.Integer} object. - */ Integer device(); - /** - *

    getDevice.

    - * - * @return a {@link java.lang.Integer} object. - */ default Integer getDevice() { return this.device(); } diff --git a/pi4j-core/src/main/java/com/pi4j/config/DeviceConfigBuilder.java b/pi4j-core/src/main/java/com/pi4j/config/DeviceConfigBuilder.java index 97cab376..decf25fc 100644 --- a/pi4j-core/src/main/java/com/pi4j/config/DeviceConfigBuilder.java +++ b/pi4j-core/src/main/java/com/pi4j/config/DeviceConfigBuilder.java @@ -30,15 +30,7 @@ * * @param * @param - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface DeviceConfigBuilder extends ConfigBuilder { - /** - *

    device.

    - * - * @param device a {@link java.lang.Integer} object. - * @return a BUILDER_TYPE object. - */ BUILDER_TYPE device(Integer device); } diff --git a/pi4j-core/src/main/java/com/pi4j/config/PortConfig.java b/pi4j-core/src/main/java/com/pi4j/config/PortConfig.java index 5d1df5a1..2ea7efd4 100644 --- a/pi4j-core/src/main/java/com/pi4j/config/PortConfig.java +++ b/pi4j-core/src/main/java/com/pi4j/config/PortConfig.java @@ -29,8 +29,6 @@ *

    PortConfig interface.

    * * @param - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface PortConfig extends Config { @@ -39,18 +37,8 @@ public interface PortConfig extends Configport.

    - * - * @return a {@link String} object. - */ String port(); - /** - *

    getPort.

    - * - * @return a {@link String} object. - */ default String getPort() { return this.port(); } diff --git a/pi4j-core/src/main/java/com/pi4j/config/PortConfigBuilder.java b/pi4j-core/src/main/java/com/pi4j/config/PortConfigBuilder.java index 51e822c6..86ed0d22 100644 --- a/pi4j-core/src/main/java/com/pi4j/config/PortConfigBuilder.java +++ b/pi4j-core/src/main/java/com/pi4j/config/PortConfigBuilder.java @@ -30,15 +30,7 @@ * * @param * @param - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface PortConfigBuilder extends ConfigBuilder { - /** - *

    port.

    - * - * @param port a {@link String} object. - * @return a BUILDER_TYPE object. - */ BUILDER_TYPE port(String port); } diff --git a/pi4j-core/src/main/java/com/pi4j/config/exception/ConfigEmptyException.java b/pi4j-core/src/main/java/com/pi4j/config/exception/ConfigEmptyException.java index 74e99be6..d3da4002 100644 --- a/pi4j-core/src/main/java/com/pi4j/config/exception/ConfigEmptyException.java +++ b/pi4j-core/src/main/java/com/pi4j/config/exception/ConfigEmptyException.java @@ -32,9 +32,6 @@ *

    * * @see http://www.pi4j.com/ - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public class ConfigEmptyException extends ConfigException { @@ -48,11 +45,6 @@ public ConfigEmptyException(){ super(MESSAGE); } - /** - *

    Constructor for ConfigEmptyException.

    - * - * @param cause a {@link java.lang.Throwable} object. - */ public ConfigEmptyException(Throwable cause){ super(MESSAGE, cause); } diff --git a/pi4j-core/src/main/java/com/pi4j/config/exception/ConfigException.java b/pi4j-core/src/main/java/com/pi4j/config/exception/ConfigException.java index b038f732..c264c132 100644 --- a/pi4j-core/src/main/java/com/pi4j/config/exception/ConfigException.java +++ b/pi4j-core/src/main/java/com/pi4j/config/exception/ConfigException.java @@ -32,9 +32,6 @@ *

    * * @see http://www.pi4j.com/ - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public class ConfigException extends RuntimeException { @@ -47,21 +44,10 @@ public ConfigException(String message){ super(message); } - /** - *

    Constructor for ConfigException.

    - * - * @param cause a {@link java.lang.Throwable} object. - */ public ConfigException(Throwable cause){ super(cause); } - /** - *

    Constructor for ConfigException.

    - * - * @param message a {@link java.lang.String} object. - * @param cause a {@link java.lang.Throwable} object. - */ public ConfigException(String message, Throwable cause){ super(message,cause); } diff --git a/pi4j-core/src/main/java/com/pi4j/config/exception/ConfigMissingPrefixException.java b/pi4j-core/src/main/java/com/pi4j/config/exception/ConfigMissingPrefixException.java index a3d2c3be..57ed0dc7 100644 --- a/pi4j-core/src/main/java/com/pi4j/config/exception/ConfigMissingPrefixException.java +++ b/pi4j-core/src/main/java/com/pi4j/config/exception/ConfigMissingPrefixException.java @@ -32,9 +32,6 @@ *

    * * @see http://www.pi4j.com/ - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public class ConfigMissingPrefixException extends ConfigException { @@ -48,11 +45,6 @@ public ConfigMissingPrefixException(){ super(MESSAGE); } - /** - *

    Constructor for ConfigMissingPrefixException.

    - * - * @param cause a {@link java.lang.Throwable} object. - */ public ConfigMissingPrefixException(Throwable cause){ super(MESSAGE, cause); } diff --git a/pi4j-core/src/main/java/com/pi4j/config/exception/ConfigMissingRequiredKeyException.java b/pi4j-core/src/main/java/com/pi4j/config/exception/ConfigMissingRequiredKeyException.java index efdb2a52..22f4d33f 100644 --- a/pi4j-core/src/main/java/com/pi4j/config/exception/ConfigMissingRequiredKeyException.java +++ b/pi4j-core/src/main/java/com/pi4j/config/exception/ConfigMissingRequiredKeyException.java @@ -32,9 +32,6 @@ *

    * * @see http://www.pi4j.com/ - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public class ConfigMissingRequiredKeyException extends ConfigException { @@ -43,19 +40,11 @@ public class ConfigMissingRequiredKeyException extends ConfigException { /** * Default Constructor - * - * @param key a {@link java.lang.String} object. */ public ConfigMissingRequiredKeyException(String key){ super(MESSAGE + key); } - /** - *

    Constructor for ConfigMissingRequiredKeyException.

    - * - * @param key a {@link java.lang.String} object. - * @param cause a {@link java.lang.Throwable} object. - */ public ConfigMissingRequiredKeyException(String key, Throwable cause){ super(MESSAGE + key, cause); } diff --git a/pi4j-core/src/main/java/com/pi4j/config/impl/BcmConfigBase.java b/pi4j-core/src/main/java/com/pi4j/config/impl/BcmConfigBase.java index 780122d6..58e70f20 100644 --- a/pi4j-core/src/main/java/com/pi4j/config/impl/BcmConfigBase.java +++ b/pi4j-core/src/main/java/com/pi4j/config/impl/BcmConfigBase.java @@ -36,8 +36,6 @@ *

    Abstract AddressConfigBase class.

    * * @param - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public abstract class BcmConfigBase extends ConfigBase @@ -53,11 +51,6 @@ protected BcmConfigBase() { super(); } - /** - *

    Constructor for BcmConfigBase.

    - * - * @param bcm a {@link java.lang.Integer} object. - */ protected BcmConfigBase(Integer bcm) { super(); this.bcm = bcm; @@ -65,8 +58,6 @@ protected BcmConfigBase(Integer bcm) { /** * PRIVATE CONSTRUCTOR - * - * @param properties a {@link java.util.Map} object. */ protected BcmConfigBase(Map properties) { super(properties); @@ -79,20 +70,10 @@ protected BcmConfigBase(Map properties) { } } - /** - *

    address.

    - * - * @return a {@link java.lang.Integer} object. - */ public Integer address() { return this.bcm; } - /** - *

    bcm.

    - * - * @return a {@link java.lang.Integer} object. - */ public Integer bcm() { return this.bcm; } diff --git a/pi4j-core/src/main/java/com/pi4j/config/impl/BcmConfigBuilderBase.java b/pi4j-core/src/main/java/com/pi4j/config/impl/BcmConfigBuilderBase.java index fbcc738c..ff0d68f3 100644 --- a/pi4j-core/src/main/java/com/pi4j/config/impl/BcmConfigBuilderBase.java +++ b/pi4j-core/src/main/java/com/pi4j/config/impl/BcmConfigBuilderBase.java @@ -35,8 +35,6 @@ * * @param * @param - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public abstract class BcmConfigBuilderBase extends ConfigBuilderBase @@ -48,9 +46,6 @@ public abstract class BcmConfigBuilderBaseAbstract ConfigBuilderBase class.

    * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id * @param * @param */ @@ -61,41 +59,35 @@ protected ConfigBuilderBase(Context context){ protected ConfigBuilderBase() { } - /** {@inheritDoc} */ @Override public BUILDER_TYPE id(String id){ this.properties.put(Config.ID_KEY, id); return (BUILDER_TYPE) this; } - /** {@inheritDoc} */ @Override public String id(){ return this.properties.get(Config.ID_KEY); } - /** {@inheritDoc} */ @Override public BUILDER_TYPE name(String name){ this.properties.put(Config.NAME_KEY, name); return (BUILDER_TYPE) this; } - /** {@inheritDoc} */ @Override public BUILDER_TYPE description(String description){ this.properties.put(Config.DESCRIPTION_KEY, description); return (BUILDER_TYPE) this; } - /** {@inheritDoc} */ @Override public BUILDER_TYPE load(Map properties) { this.properties.putAll(properties); return (BUILDER_TYPE) this; } - /** {@inheritDoc} */ @Override public BUILDER_TYPE load(Map properties, String prefixFilter) { // if a filter was not provided, then load properties without a filter @@ -113,13 +105,11 @@ public BUILDER_TYPE load(Map properties, String prefixFilter) { return (BUILDER_TYPE) this; } - /** {@inheritDoc} */ @Override public BUILDER_TYPE load(Properties properties) { return load(properties, null); } - /** {@inheritDoc} */ @Override public BUILDER_TYPE load(Properties properties, String prefixFilter) { // convert java.util.Properties to a Map object @@ -128,13 +118,11 @@ public BUILDER_TYPE load(Properties properties, String prefixFilter) { return load(entries, prefixFilter); } - /** {@inheritDoc} */ @Override public BUILDER_TYPE load(InputStream stream) throws IOException { return load(stream, null); } - /** {@inheritDoc} */ @Override public BUILDER_TYPE load(InputStream stream, String prefixFilter) throws IOException { Properties prop = new Properties(); @@ -142,13 +130,11 @@ public BUILDER_TYPE load(InputStream stream, String prefixFilter) throws IOExcep return load(prop, prefixFilter); } - /** {@inheritDoc} */ @Override public BUILDER_TYPE load(Reader reader) throws IOException { return load(reader, null); } - /** {@inheritDoc} */ @Override public BUILDER_TYPE load(Reader reader, String prefixFilter) throws IOException { Properties prop = new Properties(); @@ -156,13 +142,11 @@ public BUILDER_TYPE load(Reader reader, String prefixFilter) throws IOException return load(prop, prefixFilter); } - /** {@inheritDoc} */ @Override public BUILDER_TYPE load(File file) throws IOException { return load(file, null); } - /** {@inheritDoc} */ @Override public BUILDER_TYPE load(File file, String prefixFilter) throws IOException { Properties prop = new Properties(); diff --git a/pi4j-core/src/main/java/com/pi4j/config/impl/DeviceConfigBase.java b/pi4j-core/src/main/java/com/pi4j/config/impl/DeviceConfigBase.java index 453490f8..53314f39 100644 --- a/pi4j-core/src/main/java/com/pi4j/config/impl/DeviceConfigBase.java +++ b/pi4j-core/src/main/java/com/pi4j/config/impl/DeviceConfigBase.java @@ -36,8 +36,6 @@ *

    Abstract DeviceConfigBase class.

    * * @param - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public abstract class DeviceConfigBase> extends ConfigBase @@ -54,8 +52,6 @@ protected DeviceConfigBase() { /** * PRIVATE CONSTRUCTOR - * - * @param properties a {@link java.util.Map} object. */ protected DeviceConfigBase(Map properties) { super(properties); @@ -68,11 +64,6 @@ protected DeviceConfigBase(Map properties) { } } - /** - *

    device.

    - * - * @return a {@link java.lang.Integer} object. - */ public Integer device() { return this.device; } diff --git a/pi4j-core/src/main/java/com/pi4j/config/impl/DeviceConfigBuilderBase.java b/pi4j-core/src/main/java/com/pi4j/config/impl/DeviceConfigBuilderBase.java index 2a9bb687..74acc1e7 100644 --- a/pi4j-core/src/main/java/com/pi4j/config/impl/DeviceConfigBuilderBase.java +++ b/pi4j-core/src/main/java/com/pi4j/config/impl/DeviceConfigBuilderBase.java @@ -35,8 +35,6 @@ * * @param * @param - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public abstract class DeviceConfigBuilderBase extends ConfigBuilderBase @@ -48,9 +46,6 @@ public abstract class DeviceConfigBuilderBaseAbstract AddressConfigBase class.

    * * @param - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public abstract class PortConfigBase extends ConfigBase @@ -53,11 +51,6 @@ protected PortConfigBase() { super(); } - /** - *

    Constructor for PortConfigBase.

    - * - * @param port a {@link String} object. - */ protected PortConfigBase(String port) { super(); this.port = port; @@ -65,8 +58,6 @@ protected PortConfigBase(String port) { /** * PRIVATE CONSTRUCTOR - * - * @param properties a {@link Map} object. */ protected PortConfigBase(Map properties) { super(properties); @@ -79,11 +70,6 @@ protected PortConfigBase(Map properties) { } } - /** - *

    port.

    - * - * @return a {@link String} object. - */ public String port() { return this.port; } diff --git a/pi4j-core/src/main/java/com/pi4j/config/impl/PortConfigBuilderBase.java b/pi4j-core/src/main/java/com/pi4j/config/impl/PortConfigBuilderBase.java index 25d32f02..1b4125cb 100644 --- a/pi4j-core/src/main/java/com/pi4j/config/impl/PortConfigBuilderBase.java +++ b/pi4j-core/src/main/java/com/pi4j/config/impl/PortConfigBuilderBase.java @@ -36,8 +36,6 @@ * * @param * @param - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public abstract class PortConfigBuilderBase extends ConfigBuilderBase @@ -50,9 +48,6 @@ protected PortConfigBuilderBase(Context context) { super(); } - /** - * {@inheritDoc} - */ @Override public BUILDER_TYPE port(String port) { this.properties.put(PortConfig.PORT_KEY, port); diff --git a/pi4j-core/src/main/java/com/pi4j/context/Context.java b/pi4j-core/src/main/java/com/pi4j/context/Context.java index 811bca5b..e6d97167 100644 --- a/pi4j-core/src/main/java/com/pi4j/context/Context.java +++ b/pi4j-core/src/main/java/com/pi4j/context/Context.java @@ -54,32 +54,14 @@ /** *

    Context interface.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface Context extends Describable, IOCreator, ProviderProvider, InitializedEventProducer, ShutdownEventProducer { - /** - *

    config.

    - * - * @return a {@link com.pi4j.context.ContextConfig} object. - */ ContextConfig config(); - /** - *

    providers.

    - * - * @return a {@link com.pi4j.provider.Providers} object. - */ Providers providers(); - /** - *

    registry.

    - * - * @return a {@link com.pi4j.registry.Registry} object. - */ Registry registry(); /** @@ -91,9 +73,6 @@ public interface Context extends Describable, IOCreator, ProviderProvider, Initi Future submitTask(Runnable task); /** - *

    shutdown.

    - * - * @return a {@link com.pi4j.context.Context} object. * @throws com.pi4j.exception.ShutdownException if an error occurs during shutdown. */ Context shutdown() throws ShutdownException; @@ -113,9 +92,6 @@ public interface Context extends Describable, IOCreator, ProviderProvider, Initi // ------------------------------------------------------------------------ /** - *

    provider.

    - * - * @param providerId a {@link java.lang.String} object. * @param * @return * @throws ProviderNotFoundException @@ -125,10 +101,6 @@ default T provider(String providerId) throws ProviderNotFou } /** - *

    provider.

    - * - * @param providerId a {@link java.lang.String} object. - * @param providerClass a T object. * @param * @return * @throws ProviderNotFoundException @@ -142,7 +114,6 @@ default T provider(String providerId, Class providerClas /** *

    Has providers.

    * - * @param providerId a {@link java.lang.String} object. * @return */ default boolean hasProvider(String providerId) { @@ -157,7 +128,6 @@ default boolean hasProvider(String providerId) { /** *

    Has providers.

    * - * @param ioType a {@link com.pi4j.io.IOType} object. * @param * @return */ @@ -168,7 +138,6 @@ default boolean hasProvider(IOType ioType) { /** *

    Has providers.

    * - * @param providerClass a {@link java.lang.Class} object. * @param * @return */ @@ -178,9 +147,6 @@ default boolean hasProvider(Class providerClass) { /** - *

    provider.

    - * - * @param providerClass a {@link java.lang.Class} object. * @param * @return * @throws ProviderNotFoundException @@ -199,9 +165,6 @@ default T provider(Class providerClass) /** - *

    provider.

    - * - * @param ioType a {@link com.pi4j.io.IOType} object. * @param * @return * @throws ProviderNotFoundException @@ -222,8 +185,6 @@ default T provider(IOType ioType) throws ProviderNotFoundEx /** * Return the BoardInfo containing more info about the * {@link BoardModel}, {@link OperatingSystem}, and {@link JavaInfo}. - * - * @return {@link BoardInfo} */ BoardInfo boardInfo(); @@ -231,9 +192,6 @@ default T provider(IOType ioType) throws ProviderNotFoundEx // I/O INSTANCE ACCESSOR/CREATOR METHODS // ------------------------------------------------------------------------ - /** - * {@inheritDoc} - */ @Override default I create(IOConfig config, IOType ioType) { // create by explicitly configured IO from IO config @@ -307,11 +265,6 @@ default T getIO(String id, Class ioClass) throws IOInvalidIDEx // DESCRIPTOR // ------------------------------------------------------------------------ - /** - *

    describe.

    - * - * @return a {@link com.pi4j.common.Descriptor} object. - */ default Descriptor describe() { Descriptor descriptor = Descriptor.create().category("CONTEXT").name("Runtime Context").type(this.getClass()); diff --git a/pi4j-core/src/main/java/com/pi4j/context/ContextBuilder.java b/pi4j-core/src/main/java/com/pi4j/context/ContextBuilder.java index 986902d7..8d2daa58 100644 --- a/pi4j-core/src/main/java/com/pi4j/context/ContextBuilder.java +++ b/pi4j-core/src/main/java/com/pi4j/context/ContextBuilder.java @@ -38,99 +38,33 @@ /** *

    ContextBuilder interface.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface ContextBuilder extends Builder { - /** - *

    newInstance.

    - * - * @return a {@link com.pi4j.context.ContextBuilder} object. - */ static ContextBuilder newInstance(){ return DefaultContextBuilder.newInstance(); } - /** - *

    add.

    - * - * @param provider a {@link com.pi4j.provider.Provider} object. - * @return a {@link com.pi4j.context.ContextBuilder} object. - */ ContextBuilder add(Provider ... provider); - /** - *

    defaultPlatform.

    - * - * @return a {@link java.lang.String} object. - */ String defaultPlatform(); - /** - *

    defaultPlatform.

    - * - * @param platformId a {@link java.lang.String} object. - * @return a {@link com.pi4j.context.ContextBuilder} object. - */ ContextBuilder defaultPlatform(String platformId); - /** - *

    autoDetectMockPlugins.

    - * - * @return a {@link com.pi4j.context.ContextBuilder} object. - */ ContextBuilder autoDetectMockPlugins(); - /** - *

    autoDetectPlatforms.

    - * - * @return a {@link com.pi4j.context.ContextBuilder} object. - */ ContextBuilder autoDetectPlatforms(); - /** - *

    noAutoDetectPlatforms.

    - * - * @return a {@link com.pi4j.context.ContextBuilder} object. - */ ContextBuilder noAutoDetectPlatforms(); - /** - *

    autoDetectProviders.

    - * - * @return a {@link com.pi4j.context.ContextBuilder} object. - */ ContextBuilder autoDetectProviders(); - /** - *

    noAutoDetectProviders.

    - * - * @return a {@link com.pi4j.context.ContextBuilder} object. - */ ContextBuilder noAutoDetectProviders(); - /** - *

    autoInject.

    - * - * @return a {@link com.pi4j.context.ContextBuilder} object. - */ ContextBuilder autoInject(); - /** - *

    noAutoInject.

    - * - * @return a {@link com.pi4j.context.ContextBuilder} object. - */ ContextBuilder noAutoInject(); - /** - *

    setAutoInject.

    - * - * @param autoInject a boolean. - * @return a {@link com.pi4j.context.ContextBuilder} object. - */ default ContextBuilder setAutoInject(boolean autoInject){ if(autoInject) return autoInject(); @@ -138,27 +72,10 @@ default ContextBuilder setAutoInject(boolean autoInject){ return noAutoInject(); } - /** - *

    enableShutdownHook.

    - * - * @return a {@link com.pi4j.context.ContextBuilder} object. - */ ContextBuilder enableShutdownHook(); - /** - *

    disableShutdownHook.

    - * - * @return a {@link com.pi4j.context.ContextBuilder} object. - */ ContextBuilder disableShutdownHook(); - /** - *

    setShutdownHook.

    - * - * @param enableShutdownHook a boolean. - * - * @return a {@link com.pi4j.context.ContextBuilder} object. - */ default ContextBuilder setShutdownHook(boolean enableShutdownHook) { if (enableShutdownHook) return enableShutdownHook(); @@ -166,19 +83,8 @@ default ContextBuilder setShutdownHook(boolean enableShutdownHook) { return disableShutdownHook(); } - /** - *

    toConfig.

    - * - * @return a {@link com.pi4j.context.ContextConfig} object. - */ ContextConfig toConfig(); - /** - *

    setAutoDetect.

    - * - * @param autoDetect a boolean. - * @return a {@link com.pi4j.context.ContextBuilder} object. - */ default ContextBuilder setAutoDetect(boolean autoDetect){ if(autoDetect) return autoDetect(); @@ -186,116 +92,48 @@ default ContextBuilder setAutoDetect(boolean autoDetect){ return noAutoDetect(); } - /** - *

    autoDetect.

    - * - * @return a {@link com.pi4j.context.ContextBuilder} object. - */ default ContextBuilder autoDetect(){ // auto detect all extensibility modules in the classpath return autoDetectPlatforms(). autoDetectProviders(); } - /** - *

    noAutoDetect.

    - * - * @return a {@link com.pi4j.context.ContextBuilder} object. - */ default ContextBuilder noAutoDetect(){ // do not auto detect all extensibility modules in the classpath return noAutoDetectPlatforms(). noAutoDetectProviders(); } - /** - *

    property.

    - * - * @param key a {@link java.lang.String} object. - * @param value a {@link java.lang.String} object. - * @return a {@link com.pi4j.context.ContextBuilder} object. - */ ContextBuilder property(String key, String value); - /** - *

    property.

    - * - * @param value a {@link java.util.Map.Entry} object. - * @return a {@link com.pi4j.context.ContextBuilder} object. - */ ContextBuilder property(Map.Entry ... value); - /** - *

    properties.

    - * - * @param values a {@link java.util.Map} object. - * @return a {@link com.pi4j.context.ContextBuilder} object. - */ ContextBuilder properties(Map values); - /** - *

    properties.

    - * - * @param properties a {@link java.util.Map} object. - * @param prefixFilter a {@link java.lang.String} object. - * @return a {@link com.pi4j.context.ContextBuilder} object. - */ ContextBuilder properties(Map properties, String prefixFilter); - /** - *

    properties.

    - * - * @param properties a {@link java.util.Properties} object. - * @param prefixFilter a {@link java.lang.String} object. - * @return a {@link com.pi4j.context.ContextBuilder} object. - */ ContextBuilder properties(Properties properties, String prefixFilter); /** - *

    properties.

    - * - * @param stream a {@link java.io.InputStream} object. - * @param prefixFilter a {@link java.lang.String} object. - * @return a {@link com.pi4j.context.ContextBuilder} object. * @throws java.io.IOException if an error occurs accessing {@code stream}. */ ContextBuilder properties(InputStream stream, String prefixFilter) throws IOException; /** - *

    properties.

    - * - * @param reader a {@link java.io.Reader} object. - * @param prefixFilter a {@link java.lang.String} object. - * @return a {@link com.pi4j.context.ContextBuilder} object. * @throws java.io.IOException if an error occurs accessing {@code reader}. */ ContextBuilder properties(Reader reader, String prefixFilter) throws IOException; /** - *

    properties.

    - * - * @param file a {@link java.io.File} object. - * @param prefixFilter a {@link java.lang.String} object. - * @return a {@link com.pi4j.context.ContextBuilder} object. * @throws java.io.IOException if an error occurs accessing {@code file}. */ ContextBuilder properties(File file, String prefixFilter) throws IOException; - /** - *

    properties.

    - * - * @param properties a {@link java.util.Properties} object. - * @return a {@link com.pi4j.context.ContextBuilder} object. - */ default ContextBuilder properties(Properties properties){ return properties(properties, null); } /** - *

    properties.

    - * - * @param stream a {@link java.io.InputStream} object. - * @return a {@link com.pi4j.context.ContextBuilder} object. * @throws java.io.IOException if an error occurs accessing {@code stream}. */ default ContextBuilder properties(InputStream stream) throws IOException { @@ -303,10 +141,6 @@ default ContextBuilder properties(InputStream stream) throws IOException { } /** - *

    properties.

    - * - * @param reader a {@link java.io.Reader} object. - * @return a {@link com.pi4j.context.ContextBuilder} object. * @throws java.io.IOException if an error occurs accessing {@code reader}. */ default ContextBuilder properties(Reader reader) throws IOException { @@ -314,84 +148,37 @@ default ContextBuilder properties(Reader reader) throws IOException { } /** - *

    properties.

    - * - * @param file a {@link java.io.File} object. - * @return a {@link com.pi4j.context.ContextBuilder} object. * @throws java.io.IOException if an error occurs accessing {@code file}. */ default ContextBuilder properties(File file) throws IOException { return properties(file, null); } - /** - *

    addProperty.

    - * - * @param key a {@link java.lang.String} object. - * @param value a {@link java.lang.String} object. - * @return a {@link com.pi4j.context.ContextBuilder} object. - */ default ContextBuilder addProperty(String key, String value){ return property(key, value); } - /** - *

    addProperty.

    - * - * @param value a {@link java.util.Map.Entry} object. - * @return a {@link com.pi4j.context.ContextBuilder} object. - */ default ContextBuilder addProperty(Map.Entry ... value){ return property(value); } - /** - *

    addProperties.

    - * - * @param properties a {@link java.util.Properties} object. - * @param prefixFilter a {@link java.lang.String} object. - * @return a {@link com.pi4j.context.ContextBuilder} object. - */ default ContextBuilder addProperties(Properties properties, String prefixFilter){ return properties(properties, prefixFilter); } - /** - *

    addProperties.

    - * - * @param properties a {@link java.util.Properties} object. - * @return a {@link com.pi4j.context.ContextBuilder} object. - */ default ContextBuilder addProperties(Properties properties){ return properties(properties, null); } - /** - *

    addProperties.

    - * - * @param properties a {@link java.util.Map} object. - * @return a {@link com.pi4j.context.ContextBuilder} object. - */ default ContextBuilder addProperties(Map properties){ return properties(properties, null); } - /** - *

    addProperties.

    - * - * @param properties a {@link java.util.Map} object. - * @param prefixFilter a {@link java.lang.String} object. - * @return a {@link com.pi4j.context.ContextBuilder} object. - */ default ContextBuilder addProperties(Map properties, String prefixFilter){ return properties(properties, prefixFilter); } /** - *

    addProperties.

    - * - * @param stream a {@link java.io.InputStream} object. - * @return a {@link com.pi4j.context.ContextBuilder} object. * @throws java.io.IOException if an error occurs accessing {@code stream}. */ default ContextBuilder addProperties(InputStream stream) throws IOException{ @@ -399,11 +186,6 @@ default ContextBuilder addProperties(InputStream stream) throws IOException{ } /** - *

    addProperties.

    - * - * @param stream a {@link java.io.InputStream} object. - * @param prefixFilter a {@link java.lang.String} object. - * @return a {@link com.pi4j.context.ContextBuilder} object. * @throws java.io.IOException if an error occurs accessing {@code stream}. */ default ContextBuilder addProperties(InputStream stream, String prefixFilter) throws IOException{ @@ -411,10 +193,6 @@ default ContextBuilder addProperties(InputStream stream, String prefixFilter) th } /** - *

    addProperties.

    - * - * @param reader a {@link java.io.Reader} object. - * @return a {@link com.pi4j.context.ContextBuilder} object. * @throws java.io.IOException if an error occurs accessing {@code reader}. */ default ContextBuilder addProperties(Reader reader) throws IOException{ @@ -422,11 +200,6 @@ default ContextBuilder addProperties(Reader reader) throws IOException{ } /** - *

    addProperties.

    - * - * @param reader a {@link java.io.Reader} object. - * @param prefixFilter a {@link java.lang.String} object. - * @return a {@link com.pi4j.context.ContextBuilder} object. * @throws java.io.IOException if an error occurs accessing {@code reader}. */ default ContextBuilder addProperties(Reader reader, String prefixFilter) throws IOException{ @@ -434,10 +207,6 @@ default ContextBuilder addProperties(Reader reader, String prefixFilter) throws } /** - *

    addProperties.

    - * - * @param file a {@link java.io.File} object. - * @return a {@link com.pi4j.context.ContextBuilder} object. * @throws java.io.IOException if an error occurs accessing {@code file}. */ default ContextBuilder addProperties(File file) throws IOException{ @@ -445,34 +214,16 @@ default ContextBuilder addProperties(File file) throws IOException{ } /** - *

    addProperties.

    - * - * @param file a {@link java.io.File} object. - * @param prefixFilter a {@link java.lang.String} object. - * @return a {@link com.pi4j.context.ContextBuilder} object. * @throws java.io.IOException if an error occurs accessing {@code file}. */ default ContextBuilder addProperties(File file, String prefixFilter) throws IOException{ return properties(file, prefixFilter); } - /** - *

    add.

    - * - * @param properties a {@link java.util.Properties} object. - * @param prefixFilter a {@link java.lang.String} object. - * @return a {@link com.pi4j.context.ContextBuilder} object. - */ default ContextBuilder add(Properties properties, String prefixFilter){ return properties(properties, prefixFilter); } - /** - *

    add.

    - * - * @param properties a {@link java.util.Properties} object. - * @return a {@link com.pi4j.context.ContextBuilder} object. - */ default ContextBuilder add(Properties properties){ return properties(properties, null); } @@ -481,7 +232,6 @@ default ContextBuilder add(Properties properties){ * Sets the GPIO chip name to be used by the Context. * * @param chipName The name of the GPIO chip (e.g., "gpiochip0"). - * @return a {@link com.pi4j.context.ContextBuilder} object. */ ContextBuilder setGpioChipName(String chipName); } diff --git a/pi4j-core/src/main/java/com/pi4j/context/ContextConfig.java b/pi4j-core/src/main/java/com/pi4j/context/ContextConfig.java index 953604d0..90caedfe 100644 --- a/pi4j-core/src/main/java/com/pi4j/context/ContextConfig.java +++ b/pi4j-core/src/main/java/com/pi4j/context/ContextConfig.java @@ -32,123 +32,35 @@ /** *

    ContextConfig interface.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface ContextConfig { - /** - *

    autoDetectMockPlugins.

    - * - * @return a boolean. - */ boolean autoDetectMockPlugins(); - /** - *

    autoDetectPlatforms.

    - * - * @return a boolean. - */ boolean autoDetectPlatforms(); - /** - *

    getAutoDetectPlatforms.

    - * - * @return a boolean. - */ default boolean getAutoDetectPlatforms() { return autoDetectPlatforms(); }; - /** - *

    isAutoDetectPlatforms.

    - * - * @return a boolean. - */ default boolean isAutoDetectPlatforms() { return autoDetectPlatforms(); }; - /** - *

    autoInject.

    - * - * @return a boolean. - */ boolean autoInject(); - /** - *

    enableShutdownHook.

    - * - * @return a boolean. - */ boolean enableShutdownHook(); - /** - *

    getAutoInject.

    - * - * @return a boolean. - */ default boolean getAutoInject() { return autoInject(); }; - /** - *

    isAutoInject.

    - * - * @return a boolean. - */ default boolean isAutoInject() { return autoInject(); }; - /** - *

    defaultPlatform.

    - * - * @return a {@link java.lang.String} object. - */ String defaultPlatform(); - /** - *

    getDefaultPlatform.

    - * - * @return a {@link java.lang.String} object. - */ default String getDefaultPlatform(){ return defaultPlatform(); } - /** - *

    hasDefaultPlatform.

    - * - * @return a boolean. - */ default boolean hasDefaultPlatform(){ return getDefaultPlatform() != null;}; // ************************************************** // PROVIDERS // ************************************************** - /** - *

    providers.

    - * - * @return a {@link java.util.Collection} object. - */ Collection providers(); - /** - *

    getProviders.

    - * - * @return a {@link java.util.Collection} object. - */ default Collection getProviders(){ return providers(); } - /** - *

    autoDetectProviders.

    - * - * @return a boolean. - */ boolean autoDetectProviders(); - /** - *

    getAutoDetectProviders.

    - * - * @return a boolean. - */ default boolean getAutoDetectProviders() { return autoDetectProviders(); }; - /** - *

    isAutoDetectProviders.

    - * - * @return a boolean. - */ default boolean isAutoDetectProviders() { return autoDetectProviders(); }; // ************************************************** // PROPERTIES // ************************************************** - /** - *

    properties.

    - * - * @return a {@link java.util.Map} object. - */ Map properties(); } diff --git a/pi4j-core/src/main/java/com/pi4j/context/impl/DefaultContext.java b/pi4j-core/src/main/java/com/pi4j/context/impl/DefaultContext.java index 0e220651..7c84d455 100644 --- a/pi4j-core/src/main/java/com/pi4j/context/impl/DefaultContext.java +++ b/pi4j-core/src/main/java/com/pi4j/context/impl/DefaultContext.java @@ -50,12 +50,6 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.Future; -/** - *

    DefaultContext class.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id - */ public class DefaultContext implements Context { private final Logger logger = LoggerFactory.getLogger(this.getClass()); @@ -76,12 +70,6 @@ public class DefaultContext implements Context { private volatile boolean isShutdown = false; - /** - *

    newInstance.

    - * - * @param config a {@link com.pi4j.context.ContextConfig} object. - * @return a {@link com.pi4j.context.Context} object. - */ public static Context newInstance(ContextConfig config) { return new DefaultContext(config); } @@ -222,29 +210,23 @@ private void addProvider(Provider provider, Map providers) { } } - /** {@inheritDoc} */ @Override public ContextConfig config() { return this.config; } - /** {@inheritDoc} */ @Override public Providers providers() { return mutableProviders; } - /** {@inheritDoc} */ @Override public Registry registry() { return this.mutableRegistry; } - /** {@inheritDoc} */ @Override public BoardInfo boardInfo() { return this.boardInfo; } - /** {@inheritDoc} */ @Override public Future submitTask(Runnable task) { return this.runtimeExecutor.submit(task); } - /** {@inheritDoc} */ @Override public Context shutdown() throws ShutdownException { // shutdown the runtime diff --git a/pi4j-core/src/main/java/com/pi4j/context/impl/DefaultContextBuilder.java b/pi4j-core/src/main/java/com/pi4j/context/impl/DefaultContextBuilder.java index bccd5c35..f788d323 100644 --- a/pi4j-core/src/main/java/com/pi4j/context/impl/DefaultContextBuilder.java +++ b/pi4j-core/src/main/java/com/pi4j/context/impl/DefaultContextBuilder.java @@ -39,12 +39,6 @@ import java.util.*; import java.util.stream.Collectors; -/** - *

    DefaultContextBuilder class.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id - */ public class DefaultContextBuilder implements ContextBuilder { protected Logger logger = LoggerFactory.getLogger(DefaultContextBuilder.class); @@ -75,16 +69,10 @@ private DefaultContextBuilder(){ // forbid object construction } - /** - *

    newInstance.

    - * - * @return a {@link com.pi4j.context.ContextBuilder} object. - */ public static ContextBuilder newInstance(){ return new DefaultContextBuilder(); } - /** {@inheritDoc} */ @Override public ContextBuilder add(Provider... provider) { if(provider != null && provider.length > 0) @@ -92,13 +80,11 @@ public ContextBuilder add(Provider... provider) { return this; } - /** {@inheritDoc} */ @Override public String defaultPlatform() { return this.defaultPlatformId; } - /** {@inheritDoc} */ @Override public ContextBuilder defaultPlatform(String platformId) { this.defaultPlatformId = platformId; @@ -110,70 +96,60 @@ public ContextBuilder autoDetectMockPlugins() { return this; } - /** {@inheritDoc} */ @Override public ContextBuilder autoDetectPlatforms() { this.autoDetectPlatforms = true; return this; } - /** {@inheritDoc} */ @Override public ContextBuilder noAutoDetectPlatforms() { this.autoDetectPlatforms = false; return this; } - /** {@inheritDoc} */ @Override public ContextBuilder autoDetectProviders() { this.autoDetectProviders = true; return this; } - /** {@inheritDoc} */ @Override public ContextBuilder noAutoDetectProviders() { this.autoDetectProviders = false; return this; } - /** {@inheritDoc} */ @Override public ContextBuilder autoInject() { this.autoInject = true; return this; } - /** {@inheritDoc} */ @Override public ContextBuilder noAutoInject() { this.autoInject = false; return this; } - /** {@inheritDoc} */ @Override public ContextBuilder enableShutdownHook() { this.enableShutdownHook = true; return this; } - /** {@inheritDoc} */ @Override public ContextBuilder disableShutdownHook() { this.enableShutdownHook = false; return this; } - /** {@inheritDoc} */ @Override public ContextBuilder property(String key, String value){ this.properties.put(key, value); return this; } - /** {@inheritDoc} */ @Override public ContextBuilder property(Map.Entry ... value){ for(Map.Entry e : value){ @@ -182,7 +158,6 @@ public ContextBuilder property(Map.Entry ... value){ return this; } - /** {@inheritDoc} */ @Override public ContextBuilder properties(Properties properties, String prefixFilter){ // convert java.util.Properties to a Map object @@ -191,14 +166,12 @@ public ContextBuilder properties(Properties properties, String prefixFilter){ return properties(entries, prefixFilter); } - /** {@inheritDoc} */ @Override public ContextBuilder properties(Map properties) { this.properties.putAll(properties); return this; } - /** {@inheritDoc} */ @Override public ContextBuilder properties(Map properties, String prefixFilter){ @@ -215,7 +188,6 @@ public ContextBuilder properties(Map properties, String prefixFil return this; } - /** {@inheritDoc} */ @Override public ContextBuilder properties(InputStream stream, String prefixFilter) throws IOException{ Properties prop = new Properties(); @@ -223,7 +195,6 @@ public ContextBuilder properties(InputStream stream, String prefixFilter) throws return properties(prop, prefixFilter); } - /** {@inheritDoc} */ @Override public ContextBuilder properties(Reader reader, String prefixFilter) throws IOException{ Properties prop = new Properties(); @@ -231,7 +202,6 @@ public ContextBuilder properties(Reader reader, String prefixFilter) throws IOEx return properties(prop, prefixFilter); } - /** {@inheritDoc} */ @Override public ContextBuilder properties(File file, String prefixFilter) throws IOException{ Properties prop = new Properties(); @@ -239,14 +209,12 @@ public ContextBuilder properties(File file, String prefixFilter) throws IOExcept return properties(prop, prefixFilter); } - /** {@inheritDoc} */ @Override public ContextBuilder setGpioChipName(String chipName) { this.gpioChipName = chipName; return this; } - /** {@inheritDoc} */ @Override public ContextConfig toConfig() { // set instance reference @@ -294,7 +262,6 @@ public Map properties() { }; } - /** {@inheritDoc} */ @Override public Context build() throws Pi4JException { logger.trace("invoked 'build()'"); diff --git a/pi4j-core/src/main/java/com/pi4j/context/impl/MutableProviders.java b/pi4j-core/src/main/java/com/pi4j/context/impl/MutableProviders.java index b6e56335..48ab04cd 100644 --- a/pi4j-core/src/main/java/com/pi4j/context/impl/MutableProviders.java +++ b/pi4j-core/src/main/java/com/pi4j/context/impl/MutableProviders.java @@ -54,9 +54,6 @@ *

    *

    * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id * @see http://www.pi4j.com/ */ public class MutableProviders implements Providers { @@ -74,41 +71,26 @@ public class MutableProviders implements Providers { private ProviderGroup _spi = new ProviderGroup<>(this, IOType.SPI); private ProviderGroup _i2c = new ProviderGroup<>(this, IOType.I2C); - /** - * {@inheritDoc} - */ @Override public ProviderGroup digitalInput() { return _digitalInput; } - /** - * {@inheritDoc} - */ @Override public ProviderGroup digitalOutput() { return _digitalOutput; } - /** - * {@inheritDoc} - */ @Override public ProviderGroup pwm() { return _pwm; } - /** - * {@inheritDoc} - */ @Override public ProviderGroup spi() { return _spi; } - /** - * {@inheritDoc} - */ @Override public ProviderGroup i2c() { return _i2c; @@ -171,9 +153,6 @@ public Map all(IOType ioType) { return Collections.unmodifiableMap(result); } - /** - * {@inheritDoc} - */ @Override public boolean exists(String providerId) { @@ -198,9 +177,6 @@ public boolean exists(String providerId) { return false; } - /** - * {@inheritDoc} - */ @Override public Provider get(String providerId) throws ProviderNotFoundException { diff --git a/pi4j-core/src/main/java/com/pi4j/context/impl/MutableRegistry.java b/pi4j-core/src/main/java/com/pi4j/context/impl/MutableRegistry.java index d246aec8..9bd63e5d 100644 --- a/pi4j-core/src/main/java/com/pi4j/context/impl/MutableRegistry.java +++ b/pi4j-core/src/main/java/com/pi4j/context/impl/MutableRegistry.java @@ -42,9 +42,6 @@ /** * A mutable implementation of the Registry interface, managed by the Runtime. - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public class MutableRegistry implements Registry { @@ -86,9 +83,6 @@ synchronized void register(IO instance) throws IOInvalidIDException, IOAlreadyEx } } - /** - * {@inheritDoc} - */ @Override public synchronized T get(String id, Class type) throws IOInvalidIDException, IONotFoundException { @@ -100,9 +94,6 @@ public synchronized T get(String id, Class type) return (T) instances.get(_id); } - /** - * {@inheritDoc} - */ @Override public synchronized T get(String id) throws IOInvalidIDException, IONotFoundException { String _id = validateId(id); @@ -164,9 +155,6 @@ private void removeFromMap(T instance) { this.usedAddressesByIoType.remove(instance.type()); } - /** - * {@inheritDoc} - */ @Override public synchronized boolean exists(String id) { String _id = null; @@ -186,9 +174,6 @@ public synchronized boolean exists(IOType ioType, int identifier) { return usedAddresses != null && usedAddresses.contains(identifier); } - /** - * {@inheritDoc} - */ @Override public synchronized Map all() { return new HashMap<>(this.instances); diff --git a/pi4j-core/src/main/java/com/pi4j/event/Event.java b/pi4j-core/src/main/java/com/pi4j/event/Event.java index abb3a763..ad833b92 100644 --- a/pi4j-core/src/main/java/com/pi4j/event/Event.java +++ b/pi4j-core/src/main/java/com/pi4j/event/Event.java @@ -27,9 +27,6 @@ /** *

    Event interface.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface Event { // MARKER INTERFACE diff --git a/pi4j-core/src/main/java/com/pi4j/event/Listener.java b/pi4j-core/src/main/java/com/pi4j/event/Listener.java index 0e9358b5..c8690449 100644 --- a/pi4j-core/src/main/java/com/pi4j/event/Listener.java +++ b/pi4j-core/src/main/java/com/pi4j/event/Listener.java @@ -27,10 +27,7 @@ /** *

    Listener interface.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface Listener { - // MARKET INTERFACE + // MARKER INTERFACE } diff --git a/pi4j-core/src/main/java/com/pi4j/exception/InitializeException.java b/pi4j-core/src/main/java/com/pi4j/exception/InitializeException.java index 0782af99..a62d5960 100644 --- a/pi4j-core/src/main/java/com/pi4j/exception/InitializeException.java +++ b/pi4j-core/src/main/java/com/pi4j/exception/InitializeException.java @@ -32,16 +32,11 @@ *

    * * @see http://www.pi4j.com/ - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public class InitializeException extends Pi4JException { /** * Default Constructor - * - * @param message a {@link java.lang.String} object. */ public InitializeException(String message){ super(message); @@ -49,8 +44,6 @@ public InitializeException(String message){ /** * Default Constructor - * - * @param cause a {@link java.lang.Throwable} object. */ public InitializeException(Throwable cause){ super(cause.getMessage(), cause); @@ -58,9 +51,6 @@ public InitializeException(Throwable cause){ /** * Default Constructor - * - * @param message a {@link java.lang.String} object. - * @param cause a {@link java.lang.Throwable} object. */ public InitializeException(String message, Throwable cause){ super(message, cause); diff --git a/pi4j-core/src/main/java/com/pi4j/exception/LifecycleException.java b/pi4j-core/src/main/java/com/pi4j/exception/LifecycleException.java index b118f25c..1e6e6111 100644 --- a/pi4j-core/src/main/java/com/pi4j/exception/LifecycleException.java +++ b/pi4j-core/src/main/java/com/pi4j/exception/LifecycleException.java @@ -32,9 +32,6 @@ *

    * * @see http://www.pi4j.com/ - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public class LifecycleException extends Pi4JException { @@ -47,21 +44,10 @@ public LifecycleException(String message){ super(message); } - /** - *

    Constructor for LifecycleException.

    - * - * @param cause a {@link java.lang.Throwable} object. - */ public LifecycleException(Throwable cause){ super(cause); } - /** - *

    Constructor for LifecycleException.

    - * - * @param message a {@link java.lang.String} object. - * @param cause a {@link java.lang.Throwable} object. - */ public LifecycleException(String message, Throwable cause){ super(message,cause); } diff --git a/pi4j-core/src/main/java/com/pi4j/exception/Pi4JException.java b/pi4j-core/src/main/java/com/pi4j/exception/Pi4JException.java index 8a9c0129..86536d4e 100644 --- a/pi4j-core/src/main/java/com/pi4j/exception/Pi4JException.java +++ b/pi4j-core/src/main/java/com/pi4j/exception/Pi4JException.java @@ -31,9 +31,6 @@ *

    * * @see http://www.pi4j.com/ - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public class Pi4JException extends RuntimeException { @@ -46,21 +43,10 @@ public Pi4JException(String message){ super(message); } - /** - *

    Constructor for Pi4JException.

    - * - * @param cause a {@link java.lang.Throwable} object. - */ public Pi4JException(Throwable cause){ super(cause); } - /** - *

    Constructor for Pi4JException.

    - * - * @param message a {@link java.lang.String} object. - * @param cause a {@link java.lang.Throwable} object. - */ public Pi4JException(String message, Throwable cause){ super(message,cause); } diff --git a/pi4j-core/src/main/java/com/pi4j/exception/ShutdownException.java b/pi4j-core/src/main/java/com/pi4j/exception/ShutdownException.java index 26077cdf..fc552837 100644 --- a/pi4j-core/src/main/java/com/pi4j/exception/ShutdownException.java +++ b/pi4j-core/src/main/java/com/pi4j/exception/ShutdownException.java @@ -32,9 +32,6 @@ *

    * * @see http://www.pi4j.com/ - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public class ShutdownException extends LifecycleException { @@ -47,21 +44,10 @@ public ShutdownException(String message){ super(message); } - /** - *

    Constructor for ShutdownException.

    - * - * @param cause a {@link java.lang.Throwable} object. - */ public ShutdownException(Throwable cause){ super(cause); } - /** - *

    Constructor for ShutdownException.

    - * - * @param message a {@link java.lang.String} object. - * @param cause a {@link java.lang.Throwable} object. - */ public ShutdownException(String message, Throwable cause){ super(message,cause); } diff --git a/pi4j-core/src/main/java/com/pi4j/extension/Extension.java b/pi4j-core/src/main/java/com/pi4j/extension/Extension.java index 1637be0a..fda7213c 100644 --- a/pi4j-core/src/main/java/com/pi4j/extension/Extension.java +++ b/pi4j-core/src/main/java/com/pi4j/extension/Extension.java @@ -32,17 +32,10 @@ /** *

    Extension interface.

    * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id * @param */ public interface Extension extends Identity, Lifecycle { - /** - *

    describe.

    - * - * @return a {@link com.pi4j.common.Descriptor} object. - */ default Descriptor describe() { return Descriptor.create() .id(this.id()) diff --git a/pi4j-core/src/main/java/com/pi4j/extension/ExtensionBase.java b/pi4j-core/src/main/java/com/pi4j/extension/ExtensionBase.java index ed17692c..fb1aaf9d 100644 --- a/pi4j-core/src/main/java/com/pi4j/extension/ExtensionBase.java +++ b/pi4j-core/src/main/java/com/pi4j/extension/ExtensionBase.java @@ -30,45 +30,22 @@ /** *

    Abstract ExtensionBase class.

    * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id * @param */ public abstract class ExtensionBase extends IdentityBase implements Extension { - /** - *

    Constructor for ExtensionBase.

    - */ public ExtensionBase(){ super(); } - /** - *

    Constructor for ExtensionBase.

    - * - * @param id a {@link java.lang.String} object. - */ public ExtensionBase(String id){ super(id); } - /** - *

    Constructor for ExtensionBase.

    - * - * @param id a {@link java.lang.String} object. - * @param name a {@link java.lang.String} object. - */ public ExtensionBase(String id, String name){ super(id, name); } - /** - *

    Constructor for ExtensionBase.

    - * - * @param id a {@link java.lang.String} object. - * @param name a {@link java.lang.String} object. - * @param description a {@link java.lang.String} object. - */ public ExtensionBase(String id, String name, String description){ super(id, name, description); } diff --git a/pi4j-core/src/main/java/com/pi4j/extension/Plugin.java b/pi4j-core/src/main/java/com/pi4j/extension/Plugin.java index 5794c919..6db3d0fa 100644 --- a/pi4j-core/src/main/java/com/pi4j/extension/Plugin.java +++ b/pi4j-core/src/main/java/com/pi4j/extension/Plugin.java @@ -31,23 +31,14 @@ /** *

    Plugin interface.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface Plugin { /** - *

    initialize.

    - * - * @param service a {@link com.pi4j.extension.PluginService} object. * @throws InitializeException if error occurs initializing the plugin */ void initialize(PluginService service) throws InitializeException; /** - *

    shutdown.

    - * - * @param context a {@link com.pi4j.context.Context} object. * @throws ShutdownException if an error occurs shutting down the plugin */ default void shutdown(Context context) throws ShutdownException { @@ -56,8 +47,6 @@ default void shutdown(Context context) throws ShutdownException { /** *

    Returns true if this plugin is a mock plugin, and shouldn't generally be used

    - * - * @return a boolean */ default boolean isMock() { return false; diff --git a/pi4j-core/src/main/java/com/pi4j/extension/PluginService.java b/pi4j-core/src/main/java/com/pi4j/extension/PluginService.java index fa31ce37..32e6502a 100644 --- a/pi4j-core/src/main/java/com/pi4j/extension/PluginService.java +++ b/pi4j-core/src/main/java/com/pi4j/extension/PluginService.java @@ -30,22 +30,8 @@ /** *

    PluginService interface.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface PluginService { - /** - *

    context.

    - * - * @return a {@link com.pi4j.context.Context} object. - */ Context context(); - /** - *

    register.

    - * - * @param provider a {@link com.pi4j.provider.Provider} object. - * @return a {@link com.pi4j.extension.PluginService} object. - */ PluginService register(Provider ... provider); } diff --git a/pi4j-core/src/main/java/com/pi4j/extension/exception/ExtensionException.java b/pi4j-core/src/main/java/com/pi4j/extension/exception/ExtensionException.java index 3ca2fdd5..1693ffa3 100644 --- a/pi4j-core/src/main/java/com/pi4j/extension/exception/ExtensionException.java +++ b/pi4j-core/src/main/java/com/pi4j/extension/exception/ExtensionException.java @@ -34,9 +34,6 @@ *

    * * @see http://www.pi4j.com/ - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public class ExtensionException extends Pi4JException { @@ -49,21 +46,10 @@ public ExtensionException(String message){ super(message); } - /** - *

    Constructor for ExtensionException.

    - * - * @param cause a {@link java.lang.Throwable} object. - */ public ExtensionException(Throwable cause){ super(cause); } - /** - *

    Constructor for ExtensionException.

    - * - * @param message a {@link java.lang.String} object. - * @param cause a {@link java.lang.Throwable} object. - */ public ExtensionException(String message, Throwable cause){ super(message,cause); } diff --git a/pi4j-core/src/main/java/com/pi4j/extension/impl/DefaultPluginService.java b/pi4j-core/src/main/java/com/pi4j/extension/impl/DefaultPluginService.java index 6fd783c4..652e80b4 100644 --- a/pi4j-core/src/main/java/com/pi4j/extension/impl/DefaultPluginService.java +++ b/pi4j-core/src/main/java/com/pi4j/extension/impl/DefaultPluginService.java @@ -29,24 +29,11 @@ import com.pi4j.extension.PluginService; import com.pi4j.provider.Provider; -/** - *

    DefaultPluginService class.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id - */ public class DefaultPluginService implements PluginService { private Context context = null; private PluginStore store = null; - /** - *

    newInstance.

    - * - * @param context a {@link com.pi4j.context.Context} object. - * @param store a {@link com.pi4j.extension.impl.PluginStore} object. - * @return a {@link com.pi4j.extension.PluginService} object. - */ public static PluginService newInstance(Context context, PluginStore store){ return new DefaultPluginService(context, store); } @@ -58,13 +45,11 @@ private DefaultPluginService(Context context, PluginStore store) { this.store = store; } - /** {@inheritDoc} */ @Override public Context context() { return this.context; } - /** {@inheritDoc} */ @Override public PluginService register(Provider... provider) { if(provider != null) { diff --git a/pi4j-core/src/main/java/com/pi4j/extension/impl/PluginStore.java b/pi4j-core/src/main/java/com/pi4j/extension/impl/PluginStore.java index 50e7cec6..38a472db 100644 --- a/pi4j-core/src/main/java/com/pi4j/extension/impl/PluginStore.java +++ b/pi4j-core/src/main/java/com/pi4j/extension/impl/PluginStore.java @@ -31,12 +31,6 @@ import java.util.HashSet; import java.util.Set; -/** - *

    PluginStore class.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id - */ public class PluginStore { public Set providers = Collections.synchronizedSet(new HashSet<>()); } diff --git a/pi4j-core/src/main/java/com/pi4j/internal/IOCreator.java b/pi4j-core/src/main/java/com/pi4j/internal/IOCreator.java index ffcbc3ab..dce37a86 100644 --- a/pi4j-core/src/main/java/com/pi4j/internal/IOCreator.java +++ b/pi4j-core/src/main/java/com/pi4j/internal/IOCreator.java @@ -63,102 +63,42 @@ default I create(IOConfigBuilder builder, Class ioClass) { return create((IOConfig) builder.build(), ioClass); } - /** - *

    create.

    - * - * @param config a {@link com.pi4j.io.gpio.digital.DigitalOutputConfig} object. - * @return a {@link com.pi4j.io.gpio.digital.DigitalOutput} object. - */ default DigitalOutput create(DigitalOutputConfig config) { return create(config, DigitalOutput.class); } - /** - *

    create.

    - * - * @param config a {@link com.pi4j.io.gpio.digital.DigitalInputConfig} object. - * @return a {@link com.pi4j.io.gpio.digital.DigitalInput} object. - */ default DigitalInput create(DigitalInputConfig config) { return create(config, DigitalInput.class); } - /** - *

    create.

    - * - * @param config a {@link com.pi4j.io.pwm.PwmConfig} object. - * @return a {@link com.pi4j.io.pwm.Pwm} object. - */ default Pwm create(PwmConfig config) { return create(config, Pwm.class); } - /** - *

    create.

    - * - * @param config a {@link com.pi4j.io.i2c.I2CConfig} object. - * @return a {@link com.pi4j.io.i2c.I2C} object. - */ default I2C create(I2CConfig config) { return create(config, I2C.class); } - /** - *

    create.

    - * - * @param config a {@link com.pi4j.io.spi.SpiConfig} object. - * @return a {@link com.pi4j.io.spi.Spi} object. - */ default Spi create(SpiConfig config) { return create(config, Spi.class); } - /** - *

    create.

    - * - * @param config a {@link com.pi4j.io.gpio.digital.DigitalOutputConfigBuilder} object. - * @return a {@link com.pi4j.io.gpio.digital.DigitalOutput} object. - */ default DigitalOutput create(DigitalOutputConfigBuilder config) { return create(config.build()); } - /** - *

    create.

    - * - * @param config a {@link com.pi4j.io.gpio.digital.DigitalInputConfigBuilder} object. - * @return a {@link com.pi4j.io.gpio.digital.DigitalInput} object. - */ default DigitalInput create(DigitalInputConfigBuilder config) { return create(config.build()); } - /** - *

    create.

    - * - * @param config a {@link com.pi4j.io.pwm.PwmConfigBuilder} object. - * @return a {@link com.pi4j.io.pwm.Pwm} object. - */ default Pwm create(PwmConfigBuilder config) { return create(config.build()); } - /** - *

    create.

    - * - * @param config a {@link com.pi4j.io.i2c.I2CConfigBuilder} object. - * @return a {@link com.pi4j.io.i2c.I2C} object. - */ default I2C create(I2CConfigBuilder config) { return create(config.build()); } - /** - *

    create.

    - * - * @param config a {@link com.pi4j.io.spi.SpiConfigBuilder} object. - * @return a {@link com.pi4j.io.spi.Spi} object. - */ default Spi create(SpiConfigBuilder config) { return create(config.build()); } diff --git a/pi4j-core/src/main/java/com/pi4j/internal/ProviderProvider.java b/pi4j-core/src/main/java/com/pi4j/internal/ProviderProvider.java index e5011841..5c9e76ed 100644 --- a/pi4j-core/src/main/java/com/pi4j/internal/ProviderProvider.java +++ b/pi4j-core/src/main/java/com/pi4j/internal/ProviderProvider.java @@ -39,10 +39,6 @@ public interface ProviderProvider { /** - *

    din.

    - * - * @param a T object. - * @return a T object. * @throws ProviderException if any. */ default T din() throws ProviderException { @@ -50,10 +46,6 @@ default T din() throws ProviderException { } /** - *

    dout.

    - * - * @param a T object. - * @return a T object. * @throws ProviderException if any. */ default T dout() throws ProviderException { @@ -61,10 +53,6 @@ default T dout() throws ProviderException { } /** - *

    digitalInput.

    - * - * @param a T object. - * @return a T object. * @throws ProviderException if any. */ default T digitalInput() throws ProviderException { @@ -72,10 +60,6 @@ default T digitalInput() throws ProviderExcepti } /** - *

    digitalOutput.

    - * - * @param a T object. - * @return a T object. * @throws ProviderException if any. */ default T digitalOutput() throws ProviderException { @@ -83,10 +67,6 @@ default T digitalOutput() throws ProviderExcep } /** - *

    pwm.

    - * - * @param a T object. - * @return a T object. * @throws ProviderException if any. */ default T pwm() throws ProviderException { @@ -94,10 +74,6 @@ default T pwm() throws ProviderException { } /** - *

    spi.

    - * - * @param a T object. - * @return a T object. * @throws ProviderException if any. */ default T spi() throws ProviderException { @@ -105,10 +81,6 @@ default T spi() throws ProviderException { } /** - *

    i2c.

    - * - * @param a T object. - * @return a T object. * @throws ProviderException if any. */ default T i2c() throws ProviderException { @@ -116,10 +88,6 @@ default T i2c() throws ProviderException { } /** - *

    digitalInput.

    - * - * @param a T object. - * @return a T object. * @throws ProviderException if any. */ default T getDigitalInputProvider() throws ProviderException { @@ -127,10 +95,6 @@ default T getDigitalInputProvider() throws Prov } /** - *

    digitalOutput.

    - * - * @param a T object. - * @return a T object. * @throws ProviderException if any. */ default T getDigitalOutputProvider() throws ProviderException { @@ -138,10 +102,6 @@ default T getDigitalOutputProvider() throws Pr } /** - *

    pwm.

    - * - * @param a T object. - * @return a T object. * @throws ProviderException if any. */ default T getPwmProvider() throws ProviderException { @@ -149,10 +109,6 @@ default T getPwmProvider() throws ProviderException { } /** - *

    spi.

    - * - * @param a T object. - * @return a T object. * @throws ProviderException if any. */ default T getSpiProvider() throws ProviderException { @@ -160,10 +116,6 @@ default T getSpiProvider() throws ProviderException { } /** - *

    i2c.

    - * - * @param a T object. - * @return a T object. * @throws ProviderException if any. */ default T getI2CProvider() throws ProviderException { @@ -171,79 +123,34 @@ default T getI2CProvider() throws ProviderException { } /** - *

    provider.

    - * - * @param providerId a {@link java.lang.String} object. - * @param a T object. - * @return a T object. * @throws com.pi4j.provider.exception.ProviderNotFoundException if any. */ T provider(String providerId) throws ProviderNotFoundException; /** - *

    provider.

    - * - * @param providerId a {@link java.lang.String} object. - * @param providerClass a T object. * @param the provider type - * @return a T object. * @throws ProviderNotFoundException if any. */ T provider(String providerId, Class providerClass) throws ProviderNotFoundException; /** - *

    provider.

    - * - * @param providerClass a {@link java.lang.Class} object. - * @param a T object. - * @return a T object. * @throws ProviderNotFoundException if any. * @throws ProviderInterfaceException if any. */ T provider(Class providerClass) throws ProviderNotFoundException, ProviderInterfaceException; /** - *

    provider.

    - * - * @param ioType a {@link com.pi4j.io.IOType} object. - * @param a T object. - * @return a T object. * @throws ProviderNotFoundException if the provider specified by {@code ioType} can not be found. */ T provider(IOType ioType) throws ProviderNotFoundException; - /** - *

    hasProvider.

    - * - * @param providerId a {@link java.lang.String} object. - * @return a boolean. - */ boolean hasProvider(String providerId); - /** - *

    hasProvider.

    - * - * @param providerClass a {@link java.lang.Class} object. - * @param a T object. - * @return a boolean. - */ boolean hasProvider(Class providerClass); - /** - *

    hasProvider.

    - * - * @param ioType a {@link com.pi4j.io.IOType} object. - * @param a T object. - * @return a boolean. - */ boolean hasProvider(IOType ioType); /** - *

    provider.

    - * - * @param providerId a {@link java.lang.String} object. - * @param a T object. - * @return a T object. * @throws ProviderNotFoundException if the provider specified by {@code providerId} can not be found. */ default T getProvider(String providerId) throws ProviderNotFoundException { @@ -251,12 +158,7 @@ default T getProvider(String providerId) throws ProviderNot } /** - *

    provider.

    - * - * @param providerId a {@link java.lang.String} object. * @param providerClass - * @param a T object. - * @return a T object. * @throws ProviderNotFoundException if the provider specified by {@code providerId} can not be found. */ default T getProvider(String providerId, Class providerClass) throws ProviderNotFoundException { @@ -264,11 +166,6 @@ default T getProvider(String providerId, Class providerC } /** - *

    provider.

    - * - * @param providerClass a {@link java.lang.Class} object. - * @param a T object. - * @return a T object. * @throws ProviderNotFoundException if the provider specified by {@code providerClass} can not be found. * @throws ProviderInterfaceException if {@code providerClass} is not a valid provider. */ @@ -278,11 +175,6 @@ default T getProvider(Class providerClass) throws Provid } /** - *

    provider.

    - * - * @param ioType a {@link com.pi4j.io.IOType} object. - * @param a T object. - * @return a T object. * @throws ProviderNotFoundException if the provider specified by {@code ioType} can not be found. */ default T getProvider(IOType ioType) throws ProviderNotFoundException { diff --git a/pi4j-core/src/main/java/com/pi4j/io/IO.java b/pi4j-core/src/main/java/com/pi4j/io/IO.java index 5e161509..11bdac6e 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/IO.java +++ b/pi4j-core/src/main/java/com/pi4j/io/IO.java @@ -35,8 +35,6 @@ /** *

    IO interface.

    * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id * @param * @param * @param @@ -54,41 +52,14 @@ public interface IOconfig.

    - * - * @return a CONFIG_TYPE object. - */ CONFIG_TYPE config(); - /** - *

    type.

    - * - * @return a {@link com.pi4j.io.IOType} object. - */ default IOType type() { return IOType.getByIOClass(this.getClass()); } // TODO :: RECONCILE IDENTITY PROPERTIES BETWEEN IO INSTANCE AND UNDERLYING CONFIG; PROBABLY NEED TO REMOVE THESE SETTERS - /** - *

    name.

    - * - * @param name a {@link java.lang.String} object. - * @return a IO_TYPE object. - */ IO_TYPE name(String name); - /** - *

    description.

    - * - * @param description a {@link java.lang.String} object. - * @return a IO_TYPE object. - */ IO_TYPE description(String description); - /** - *

    provider.

    - * - * @return a PROVIDER_TYPE object. - */ PROVIDER_TYPE provider(); } diff --git a/pi4j-core/src/main/java/com/pi4j/io/IOBase.java b/pi4j-core/src/main/java/com/pi4j/io/IOBase.java index d5bec9ee..ff5b4a08 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/IOBase.java +++ b/pi4j-core/src/main/java/com/pi4j/io/IOBase.java @@ -37,8 +37,6 @@ /** *

    Abstract IOBase class.

    * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id * @param * @param * @param @@ -52,18 +50,11 @@ public abstract class IOBaseConstructor for IOBase.

    - * - * @param provider a PROVIDER_TYPE object. - * @param config a CONFIG_TYPE object. - */ public IOBase(PROVIDER_TYPE provider, CONFIG_TYPE config){ super(); this.id = config.id(); @@ -73,14 +64,12 @@ public IOBase(PROVIDER_TYPE provider, CONFIG_TYPE config){ this.config = config; } - /** {@inheritDoc} */ @Override public IO_TYPE name(String name){ this.name = name; return (IO_TYPE)this; } - /** {@inheritDoc} */ @Override public IO_TYPE description(String description){ this.description = description; @@ -107,7 +96,6 @@ public void close() { } } - /** {@inheritDoc} */ @Override public CONFIG_TYPE config(){ return this.config; @@ -117,14 +105,12 @@ protected Context context() { return this.context; } - /** {@inheritDoc} */ @Override public IO_TYPE initialize(Context context) throws InitializeException { this.context = context; return (IO_TYPE) this; } - /** {@inheritDoc} */ @Override public IO_TYPE shutdownInternal(Context context) throws ShutdownException { // Close is supposed to be idempotent. We interpret this here to include effective shutdowns by @@ -136,7 +122,6 @@ public IO_TYPE shutdownInternal(Context context) throws ShutdownException { return (IO_TYPE) this; } - /** {@inheritDoc} */ @Override public Descriptor describe() { return super.describe().category("IO"); diff --git a/pi4j-core/src/main/java/com/pi4j/io/IOBcmConfigBuilder.java b/pi4j-core/src/main/java/com/pi4j/io/IOBcmConfigBuilder.java index 1befe64f..31aa47fd 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/IOBcmConfigBuilder.java +++ b/pi4j-core/src/main/java/com/pi4j/io/IOBcmConfigBuilder.java @@ -33,8 +33,6 @@ * * @param * @param - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface IOBcmConfigBuilder extends IOConfigBuilder, diff --git a/pi4j-core/src/main/java/com/pi4j/io/IOConfig.java b/pi4j-core/src/main/java/com/pi4j/io/IOConfig.java index 0a8cd602..1a4b4459 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/IOConfig.java +++ b/pi4j-core/src/main/java/com/pi4j/io/IOConfig.java @@ -31,8 +31,6 @@ *

    IOConfig interface.

    * * @param - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface IOConfig extends Config { String PLATFORM_KEY = "platform"; diff --git a/pi4j-core/src/main/java/com/pi4j/io/IOConfigBuilder.java b/pi4j-core/src/main/java/com/pi4j/io/IOConfigBuilder.java index 88074a87..abc03d3d 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/IOConfigBuilder.java +++ b/pi4j-core/src/main/java/com/pi4j/io/IOConfigBuilder.java @@ -31,8 +31,6 @@ /** *

    IOConfigBuilder interface.

    * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id * @param * @param */ diff --git a/pi4j-core/src/main/java/com/pi4j/io/IODataReader.java b/pi4j-core/src/main/java/com/pi4j/io/IODataReader.java index 34d58107..4772b5bd 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/IODataReader.java +++ b/pi4j-core/src/main/java/com/pi4j/io/IODataReader.java @@ -37,13 +37,6 @@ /** * Data Writer Interface for Pi4J Data Communications - * - * @author Robert Savage - *

    - * Based on previous contributions from: - * Daniel Sendula, - * RasPelikan - * @version $Id: $Id */ public interface IODataReader extends Readable { @@ -55,7 +48,7 @@ public interface IODataReader extends Readable { * Read a single raw byte (8-bit) value from the I/O device. * * @return If successful, a zero or positive integer value representing the byte value (0-255) - * is returned. If a read error was encountered, a negative error code may be returned. + * is returned. If a read error was encountered, a negative error code may be returned. */ int read(); @@ -72,7 +65,7 @@ public interface IODataReader extends Readable { * @param offset the offset index in the data buffer to start copying read data * @param length the number of bytes to read * @return If successful, return the number of bytes read from the I/O device; - * else on a read error, return a negative error code. + * else on a read error, return a negative error code. */ int read(byte[] buffer, int offset, int length); @@ -83,7 +76,7 @@ public interface IODataReader extends Readable { * @param buffer the byte array/buffer the read data will be copied/inserted into * @param length the number of bytes to read * @return If successful, return the number of bytes read from the I/O device; - * else on a read error, return a negative error code. + * else on a read error, return a negative error code. */ default int read(byte[] buffer, int length) { return read(buffer, 0, length); @@ -95,7 +88,7 @@ default int read(byte[] buffer, int length) { * * @param buffer the byte array/buffer the read data will be copied/inserted into * @return If successful, return the number of bytes read from the I/O device; - * else on a read error, return a negative error code. + * else on a read error, return a negative error code. */ default int read(byte[] buffer) { return read(buffer, buffer.length); @@ -111,34 +104,34 @@ default int read(byte[] buffer) { * offset and up to the specified data length (number of bytes). *

    * NOTE: The buffer's internal position tracking is not - * used but rather only the explicit offset and - * length provided. If the requested length is - * greater than the buffers capacity (minus offset) - * then the specified length will be ignored and - * this function will only write the number of - * bytes up to the buffers' available space. + * used but rather only the explicit offset and + * length provided. If the requested length is + * greater than the buffers capacity (minus offset) + * then the specified length will be ignored and + * this function will only write the number of + * bytes up to the buffers' available space. * * @param buffer the byte buffer the read data will be copied/inserted into * @param offset the offset index in the data buffer to start copying read data * @param length the number of bytes to read * @return If successful, return the number of bytes read from the I/O device; - * else on a read error, return a negative error code. + * else on a read error, return a negative error code. */ default int read(ByteBuffer buffer, int offset, int length) { // perform bounds checking on requested length versus total remaining size available - if(length > (buffer.capacity()-offset)){ - length = buffer.capacity()-offset; + if (length > (buffer.capacity() - offset)) { + length = buffer.capacity() - offset; } // create a temporary byte array to read in the length of data bytes byte[] temp = new byte[length]; - int actualLength = read(temp, 0 ,length); + int actualLength = read(temp, 0, length); // return any error codes ( < 0) - if(actualLength < 0) return actualLength; + if (actualLength < 0) return actualLength; // perform bounds checking on number of bytes read versus the length requested - if(actualLength < length) length = actualLength; + if (actualLength < length) length = actualLength; // copy the data from the temporary byte array into the return buffer at the given offset buffer.position(offset); @@ -153,26 +146,26 @@ default int read(ByteBuffer buffer, int offset, int length) { * with the first byte in the array up to the provided length. *

    * NOTE: The data bytes read from the I/O device are copied/ - * inserted into the byte buffer starting at the current - * position index up to the length requested or up to the - * buffer's remaining limit; whichever is is lower . If - * the buffer's current position is already at the buffer's - * limit, then we will automatically rewind the buffer to - * begin writing data from the zero position up to the - * buffer's limit. + * inserted into the byte buffer starting at the current + * position index up to the length requested or up to the + * buffer's remaining limit; whichever is is lower . If + * the buffer's current position is already at the buffer's + * limit, then we will automatically rewind the buffer to + * begin writing data from the zero position up to the + * buffer's limit. * * @param buffer the byte buffer the read data will be copied/inserted into * @param length the number of bytes to read * @return If successful, return the number of bytes read from the I/O device; - * else on a read error, return a negative error code. + * else on a read error, return a negative error code. */ default int read(ByteBuffer buffer, int length) { // if the buffer position is already at the buffer limit, then rewind the buffer for // writing new data into the buffer read from the I/O device - if(buffer.position() == buffer.limit()) buffer.rewind(); + if (buffer.position() == buffer.limit()) buffer.rewind(); // bounds check the requested length; only allow reading up to the remaining space in the buffer - if(length > buffer.remaining()) length = buffer.remaining(); + if (length > buffer.remaining()) length = buffer.remaining(); // read the buffer starting at the current position up the the specified length return read(buffer, buffer.position(), length); @@ -183,22 +176,22 @@ default int read(ByteBuffer buffer, int length) { * the first byte in the array up to available space remaining in the buffer. *

    * NOTE: The data bytes read from the I/O device are copied/ - * inserted into the byte buffer starting at the current - * position index up to the buffer's remaining limit. If - * the buffer's current position is already at the buffer's - * limit, then we will automatically rewind the buffer to - * begin writing data from the zero position up to the - * buffer's limit. + * inserted into the byte buffer starting at the current + * position index up to the buffer's remaining limit. If + * the buffer's current position is already at the buffer's + * limit, then we will automatically rewind the buffer to + * begin writing data from the zero position up to the + * buffer's limit. * * @param buffer byte buffer of data where data read from the I/O device * will be copied (from current position to limit) * @return If successful, return the number of bytes read from the I2C device register; - * else on a read error, return a negative error code. + * else on a read error, return a negative error code. */ default int read(ByteBuffer buffer) { // if the buffer position is already at the buffer limit, then rewind the buffer for // writing new data into the buffer read from the I/O device - if(buffer.position() == buffer.limit()) buffer.rewind(); + if (buffer.position() == buffer.limit()) buffer.rewind(); // read the buffer starting at the current position and fill up to the remaining size return read(buffer, buffer.position(), buffer.remaining()); @@ -215,33 +208,33 @@ default int read(ByteBuffer buffer) { * set to be used to decode the bytes into chars. * * @param charset character set to use for byte decoding - * @param buffer the character array the read data will be copied/inserted into - * @param offset the offset index in the character array to start copying read data - * @param length the number of bytes to read + * @param buffer the character array the read data will be copied/inserted into + * @param offset the offset index in the character array to start copying read data + * @param length the number of bytes to read * @return If successful, return the number of bytes (not characters) read from the I/O device; - * else on a read error, return a negative error code. + * else on a read error, return a negative error code. */ default int read(Charset charset, char[] buffer, int offset, int length) { // determine the maximum number of bytes that may be needed for this character set // and create a byte array to temporarily read the raw data from the I/O device - int maxBytes = (int)charset.newDecoder().maxCharsPerByte() * length; + int maxBytes = (int) charset.newDecoder().maxCharsPerByte() * length; byte[] rx = new byte[maxBytes]; // read data from I/O device into temporary byte buffer int actualLength = read(rx, maxBytes); // return any error codes ( < 0) - if(actualLength < 0) return actualLength; + if (actualLength < 0) return actualLength; // decode byte array into char buffer CharBuffer cb = charset.decode(ByteBuffer.wrap(rx)); // perform bounds checking on number of bytes read versus the length requested - if(actualLength < length) length = actualLength; + if (actualLength < length) length = actualLength; // perform bounds checking on requested length versus total remaining size available - if(length > (buffer.length-offset)){ - length = buffer.length-offset; + if (length > (buffer.length - offset)) { + length = buffer.length - offset; } // stuff the decoded characters into the provided char array @@ -257,10 +250,10 @@ default int read(Charset charset, char[] buffer, int offset, int length) { * character set to be used to decode the bytes into chars. * * @param charset character set to use for byte decoding - * @param buffer the character array the read data will be copied/inserted into - * @param length the number of bytes to read + * @param buffer the character array the read data will be copied/inserted into + * @param length the number of bytes to read * @return If successful, return the number of bytes (not characters) read from the I/O device; - * else on a read error, return a negative error code. + * else on a read error, return a negative error code. */ default int read(Charset charset, char[] buffer, int length) { return read(buffer, 0, length); @@ -272,9 +265,9 @@ default int read(Charset charset, char[] buffer, int length) { * character set to be used to decode the bytes into chars. * * @param charset character set to use for byte decoding - * @param buffer the character array the read data will be copied/inserted into + * @param buffer the character array the read data will be copied/inserted into * @return If successful, return the number of bytes read from the I/O device; - * else on a read error, return a negative error code. + * else on a read error, return a negative error code. */ default int read(Charset charset, char[] buffer) { return read(buffer, buffer.length); @@ -289,7 +282,7 @@ default int read(Charset charset, char[] buffer) { * @param offset the offset index in the character array to start copying read data * @param length the number of bytes to read * @return If successful, return the number of bytes (not characters) read from the I/O device; - * else on a read error, return a negative error code. + * else on a read error, return a negative error code. */ default int read(char[] buffer, int offset, int length) { return read(StandardCharsets.US_ASCII, buffer, offset, length); @@ -303,7 +296,7 @@ default int read(char[] buffer, int offset, int length) { * @param buffer the character array the read data will be copied/inserted into * @param length the number of bytes to read * @return If successful, return the number of bytes (not characters) read from the I/O device; - * else on a read error, return a negative error code. + * else on a read error, return a negative error code. */ default int read(char[] buffer, int length) { return read(StandardCharsets.US_ASCII, buffer, length); @@ -316,7 +309,7 @@ default int read(char[] buffer, int length) { * * @param buffer the character array the read data will be copied/inserted into * @return If successful, return the number of bytes (not characters) read from the I/O device; - * else on a read error, return a negative error code. + * else on a read error, return a negative error code. */ default int read(char[] buffer) { return read(StandardCharsets.US_ASCII, buffer, buffer.length); @@ -333,44 +326,44 @@ default int read(char[] buffer) { * set to be used to decode the bytes into chars. *

    * NOTE: The buffer's internal position tracking is not - * used but rather only the explicit offset and - * length provided. If the requested length is - * greater than the buffers capacity (minus offset) - * then the specified length will be ignored and - * this function will only write the number of - * characters up to the buffers' available space. + * used but rather only the explicit offset and + * length provided. If the requested length is + * greater than the buffers capacity (minus offset) + * then the specified length will be ignored and + * this function will only write the number of + * characters up to the buffers' available space. * * @param charset character set to use for byte decoding - * @param buffer the character array the read data will be copied/inserted into - * @param offset the offset index in the character buffer to start copying read data - * @param length the number of bytes to read + * @param buffer the character array the read data will be copied/inserted into + * @param offset the offset index in the character buffer to start copying read data + * @param length the number of bytes to read * @return If successful, return the number of bytes (not characters) read from the I/O device; - * else on a read error, return a negative error code. + * else on a read error, return a negative error code. */ default int read(Charset charset, CharBuffer buffer, int offset, int length) { // validate length argument - if(length <=0) throw new IllegalArgumentException("Invalid read request; length must be greater than zero."); + if (length <= 0) throw new IllegalArgumentException("Invalid read request; length must be greater than zero."); // determine the maximum number of bytes that may be needed for this character set // and create a byte array to temporarily read the raw data from the I/O device - int maxBytes = (int)charset.newDecoder().maxCharsPerByte() * length; + int maxBytes = (int) charset.newDecoder().maxCharsPerByte() * length; byte[] rx = new byte[maxBytes]; // read data from I/O device into temporary byte buffer int actualLength = read(rx, maxBytes); // return any error codes ( < 0) - if(actualLength < 0) return actualLength; + if (actualLength < 0) return actualLength; // decode byte array into char buffer CharBuffer cb = charset.decode(ByteBuffer.wrap(rx)); // perform bounds checking on number of bytes read versus the length requested - if(actualLength < length) length = actualLength; + if (actualLength < length) length = actualLength; // perform bounds checking on requested length versus total remaining size available - if(length > (buffer.capacity()-offset)){ - length = buffer.capacity()-offset; + if (length > (buffer.capacity() - offset)) { + length = buffer.capacity() - offset; } // set the buffer position to the provided offset index @@ -389,22 +382,22 @@ default int read(Charset charset, CharBuffer buffer, int offset, int length) { * Specify the character set to be used to decode the bytes into chars. *

    * NOTE: The data characters read and decoded from the I/O device are - * copied/inserted into the character buffer starting at the current - * position index up to the length requested or up to the buffer's - * remaining limit; whichever is is lower . If the buffer's current - * position is already at the buffer's limit, then we will automatically - * rewind the buffer to begin writing data from the zero position up to - * the buffer's limit. + * copied/inserted into the character buffer starting at the current + * position index up to the length requested or up to the buffer's + * remaining limit; whichever is is lower . If the buffer's current + * position is already at the buffer's limit, then we will automatically + * rewind the buffer to begin writing data from the zero position up to + * the buffer's limit. * * @param charset character set to use for byte decoding - * @param buffer the character array the read data will be copied/inserted into - * @param length the number of bytes to read + * @param buffer the character array the read data will be copied/inserted into + * @param length the number of bytes to read * @return If successful, return the number of bytes (not characters) read from the I/O device; - * else on a read error, return a negative error code. + * else on a read error, return a negative error code. */ default int read(Charset charset, CharBuffer buffer, int length) { // if the buffer position is already at the buffer limit, then rewind the buffer for reading - if(buffer.position() == buffer.limit()) buffer.rewind(); + if (buffer.position() == buffer.limit()) buffer.rewind(); return read(buffer, buffer.position(), length); } @@ -415,21 +408,21 @@ default int read(Charset charset, CharBuffer buffer, int length) { * Specify the character set to be used to decode the bytes into chars. *

    * NOTE: The data characters read from the I/O device are copied/ - * inserted into the character buffer starting at the current - * position index up to the buffer's remaining limit. If - * the buffer's current position is already at the buffer's - * limit, then we will automatically rewind the buffer to - * begin writing data from the zero position up to the - * buffer's limit. + * inserted into the character buffer starting at the current + * position index up to the buffer's remaining limit. If + * the buffer's current position is already at the buffer's + * limit, then we will automatically rewind the buffer to + * begin writing data from the zero position up to the + * buffer's limit. * * @param charset character set to use for byte decoding - * @param buffer the character array the read data will be copied/inserted into + * @param buffer the character array the read data will be copied/inserted into * @return If successful, return the number of bytes (not characters) read from the I/O device; - * else on a read error, return a negative error code. + * else on a read error, return a negative error code. */ default int read(Charset charset, CharBuffer buffer) { // if the buffer position is already at the buffer limit, then rewind the buffer for reading - if(buffer.position() == buffer.limit()) buffer.rewind(); + if (buffer.position() == buffer.limit()) buffer.rewind(); // read the buffer starting at the current position and fill up to the remaining size return read(buffer, buffer.position(), buffer.remaining()); @@ -441,18 +434,18 @@ default int read(Charset charset, CharBuffer buffer) { * character set used to decode the bytes into chars. *

    * NOTE: The buffer's internal position tracking is not - * used but rather only the explicit offset and - * length provided. If the requested length is - * greater than the buffers capacity (minus offset) - * then the specified length will be ignored and - * this function will only write the number of - * characters up to the buffers' available space. + * used but rather only the explicit offset and + * length provided. If the requested length is + * greater than the buffers capacity (minus offset) + * then the specified length will be ignored and + * this function will only write the number of + * characters up to the buffers' available space. * * @param buffer the character array the read data will be copied/inserted into * @param offset the offset index in the character buffer to start copying read data * @param length the number of bytes to read * @return If successful, return the number of bytes (not characters) read from the I/O device; - * else on a read error, return a negative error code. + * else on a read error, return a negative error code. */ default int read(CharBuffer buffer, int offset, int length) { return read(StandardCharsets.US_ASCII, buffer, offset, length); @@ -464,17 +457,17 @@ default int read(CharBuffer buffer, int offset, int length) { * ASCII is the internal character set used to decode the bytes into chars. *

    * NOTE: The data characters read and decoded from the I/O device are - * copied/inserted into the character buffer starting at the current - * position index up to the length requested or up to the buffer's - * remaining limit; whichever is is lower . If the buffer's current - * position is already at the buffer's limit, then we will automatically - * rewind the buffer to begin writing data from the zero position up to - * the buffer's limit. + * copied/inserted into the character buffer starting at the current + * position index up to the length requested or up to the buffer's + * remaining limit; whichever is is lower . If the buffer's current + * position is already at the buffer's limit, then we will automatically + * rewind the buffer to begin writing data from the zero position up to + * the buffer's limit. * * @param buffer the character array the read data will be copied/inserted into * @param length the number of bytes to read * @return If successful, return the number of bytes (not characters) read from the I/O device; - * else on a read error, return a negative error code. + * else on a read error, return a negative error code. */ default int read(CharBuffer buffer, int length) { return read(StandardCharsets.US_ASCII, buffer, length); @@ -482,18 +475,18 @@ default int read(CharBuffer buffer, int length) { /** * {@inheritDoc} - * + *

    * Read ASCII character data from the I/O device into the provided character buffer starting * at the zero index (first position) up to available space remaining in the buffer. * ASCII is the internal character set used to decode the bytes into chars. *

    * NOTE: The data characters read from the I/O device are copied/ - * inserted into the character buffer starting at the current - * position index up to the buffer's remaining limit. If - * the buffer's current position is already at the buffer's - * limit, then we will automatically rewind the buffer to - * begin writing data from the zero position up to the - * buffer's limit. + * inserted into the character buffer starting at the current + * position index up to the buffer's remaining limit. If + * the buffer's current position is already at the buffer's + * limit, then we will automatically rewind the buffer to + * begin writing data from the zero position up to the + * buffer's limit. */ default int read(CharBuffer buffer) { return read(StandardCharsets.US_ASCII, buffer); @@ -511,7 +504,7 @@ default int read(CharBuffer buffer) { */ default byte readByte() { int actual = read(); - if(actual < 0) throw new IOReadException("I2C READ ERROR; " + actual); + if (actual < 0) throw new IOReadException("I2C READ ERROR; " + actual); return (byte) actual; } @@ -527,7 +520,7 @@ default byte readByte() { * @param length the number of bytes to read * @return a new byte array containing the data bytes read from the I/O device. * @throws java.lang.IllegalArgumentException An java.lang.IllegalArgumentException is thrown if one of the - * method parameters are invalid. + * method parameters are invalid. */ default byte[] readNBytes(int offset, int length) { if (length <= 0) { @@ -539,10 +532,10 @@ default byte[] readNBytes(int offset, int length) { if (length < offset) { throw new IllegalArgumentException("length < offset"); } - int bufferSize = length-offset; + int bufferSize = length - offset; byte[] temp = new byte[bufferSize]; int actual = read(temp, offset, length); - if(actual < 0) throw new IOReadException(actual); + if (actual < 0) throw new IOReadException(actual); return Arrays.copyOf(temp, actual); } @@ -554,7 +547,7 @@ default byte[] readNBytes(int offset, int length) { * @return a new byte array containing the data bytes read from the I/O device. */ default byte[] readNBytes(int length) { - return readNBytes(0 ,length); + return readNBytes(0, length); } /** @@ -569,7 +562,7 @@ default byte[] readNBytes(int length) { * @param length the number of bytes to read * @return a new ByteBuffer containing the data bytes read from the I/O device. * @throws java.lang.IllegalArgumentException An java.lang.IllegalArgumentException is thrown if one of the - * method parameters are invalid. + * method parameters are invalid. */ default ByteBuffer readByteBuffer(int offset, int length) { if (length <= 0) { @@ -581,10 +574,10 @@ default ByteBuffer readByteBuffer(int offset, int length) { if (length < offset) { throw new IllegalArgumentException("length < offset"); } - int bufferSize = length-offset; + int bufferSize = length - offset; byte[] temp = new byte[bufferSize]; int actual = read(temp, offset, length); - if(actual < 0) throw new IOReadException(actual); + if (actual < 0) throw new IOReadException(actual); return ByteBuffer.wrap(temp, 0, actual); } @@ -597,7 +590,7 @@ default ByteBuffer readByteBuffer(int offset, int length) { * @param length the number of bytes to read * @return a new ByteBuffer containing the data bytes read from the I/O device. * @throws java.lang.IllegalArgumentException An java.lang.IllegalArgumentException is thrown if one of the - * method parameters are invalid. + * method parameters are invalid. */ default ByteBuffer readByteBuffer(int length) { return readByteBuffer(0, length); @@ -609,17 +602,17 @@ default ByteBuffer readByteBuffer(int length) { * skip a certain number of bytes in the read data and excludes them from the returned * character array. * - * @param charset character set to use for byte decoding - * @param offset the offset index in the raw bytes read to start from + * @param charset character set to use for byte decoding + * @param offset the offset index in the raw bytes read to start from * @param numberOfBytes the number of bytes to read (not number of characters) * @return a new character array containing the decoded character data read from the I/O device. * @throws java.lang.IllegalArgumentException An java.lang.IllegalArgumentException is thrown if one of the - * method parameters are invalid. + * method parameters are invalid. */ default char[] readCharArray(Charset charset, int offset, int numberOfBytes) { byte[] temp = new byte[numberOfBytes]; int actual = read(temp, offset, numberOfBytes); - if(actual < 0) throw new IOReadException(actual); + if (actual < 0) throw new IOReadException(actual); CharBuffer cb = charset.decode(ByteBuffer.wrap(temp, 0, actual)); return cb.array(); } @@ -629,7 +622,7 @@ default char[] readCharArray(Charset charset, int offset, int numberOfBytes) { * return the data read in a new character array. ASCII is the internal character * set used to decode the bytes into chars. * - * @param charset character set to use for byte decoding + * @param charset character set to use for byte decoding * @param numberOfBytes the number of bytes to read (not number of characters) * @return a new character array containing the decoded character data read from the I/O device. */ @@ -643,7 +636,7 @@ default char[] readCharArray(Charset charset, int numberOfBytes) { * skip a certain number of bytes in the read data and excludes them from the returned * character buffer. ASCII is the internal character set used to decode the bytes into chars. * - * @param offset the offset index in the raw bytes read to start from + * @param offset the offset index in the raw bytes read to start from * @param numberOfBytes the number of bytes to read (not number of characters) * @return a new character array containing the decoded character data read from the I/O device. */ @@ -668,17 +661,17 @@ default char[] readCharArray(int numberOfBytes) { * skip a certain number of bytes in the read data and excludes them from the returned * character buffer. * - * @param charset character set to use for byte decoding - * @param offset the offset index in the raw bytes read to start from + * @param charset character set to use for byte decoding + * @param offset the offset index in the raw bytes read to start from * @param numberOfBytes the number of bytes to read (not number of characters) * @return a new character buffer (CharBuffer) containing the decoded character data read from the I/O device. * @throws java.lang.IllegalArgumentException An java.lang.IllegalArgumentException is thrown if one of the - * method parameters are invalid. + * method parameters are invalid. */ default CharBuffer readCharBuffer(Charset charset, int offset, int numberOfBytes) { byte[] temp = new byte[numberOfBytes]; int actual = read(temp, offset, numberOfBytes); - if(actual < 0) throw new IOReadException(actual); + if (actual < 0) throw new IOReadException(actual); CharBuffer cb = charset.decode(ByteBuffer.wrap(temp, 0, actual)); return cb.flip(); } @@ -687,7 +680,7 @@ default CharBuffer readCharBuffer(Charset charset, int offset, int numberOfBytes * Read data from the I/O device up to a specified length (number of bytes) and * return the data read in a new CharBuffer instance. * - * @param charset character set to use for byte decoding + * @param charset character set to use for byte decoding * @param numberOfBytes the number of bytes to read (not number of characters) * @return a new character buffer (CharBuffer) containing the decoded character data read from the I/O device. */ @@ -701,7 +694,7 @@ default CharBuffer readCharBuffer(Charset charset, int numberOfBytes) { * skip a certain number of bytes in the read data and excludes them from the returned * character buffer. ASCII is the internal character set used to decode the bytes into chars. * - * @param offset the offset index in the raw bytes read to start from + * @param offset the offset index in the raw bytes read to start from * @param numberOfBytes the number of bytes to read (not number of characters) * @return a new character buffer (CharBuffer) containing the decoded character data read from the I/O device. */ @@ -727,15 +720,15 @@ default CharBuffer readCharBuffer(int numberOfBytes) { * skip a certain number of bytes in the read data and excludes them from the returned * string. * - * @param charset character set to use for byte decoding - * @param offset the offset index in the raw bytes read to start from + * @param charset character set to use for byte decoding + * @param offset the offset index in the raw bytes read to start from * @param numberOfBytes the number of bytes to read (not number of characters) * @return a new character buffer (CharBuffer) containing the decoded character data read from the I/O device. */ default String readString(Charset charset, int offset, int numberOfBytes) { byte[] temp = new byte[numberOfBytes]; int actual = read(temp, offset, numberOfBytes); - if(actual < 0) throw new IOReadException(actual); + if (actual < 0) throw new IOReadException(actual); return new String(temp, 0, actual, charset); } @@ -743,7 +736,7 @@ default String readString(Charset charset, int offset, int numberOfBytes) { * Read data from the I/O device up to a specified length (number of bytes) and * return the data read in a new String instance. * - * @param charset character set to use for byte decoding + * @param charset character set to use for byte decoding * @param numberOfBytes the number of bytes to read (not number of characters) * @return a new character buffer (CharBuffer) containing the decoded character data read from the I/O device. */ @@ -757,7 +750,7 @@ default String readString(Charset charset, int numberOfBytes) { * skip a certain number of bytes in the read data and excludes them from the returned * string. ASCII is the internal character set used to decode the bytes into chars. * - * @param offset the offset index in the raw bytes read to start from + * @param offset the offset index in the raw bytes read to start from * @param numberOfBytes the number of bytes to read (not number of characters) * @return a new character buffer (CharBuffer) containing the decoded character data read from the I/O device. */ @@ -787,7 +780,7 @@ default String readString(int numberOfBytes) { * * @return InputStream instance */ - default InputStream getInputStream(){ + default InputStream getInputStream() { var t = this; return new InputStream() { diff --git a/pi4j-core/src/main/java/com/pi4j/io/IODataWriter.java b/pi4j-core/src/main/java/com/pi4j/io/IODataWriter.java index 0a64251c..731e21d5 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/IODataWriter.java +++ b/pi4j-core/src/main/java/com/pi4j/io/IODataWriter.java @@ -39,13 +39,6 @@ /** * Data Writer Interface for Pi4J Data Communications - * - * @author Robert Savage - *

    - * Based on previous contributions from: - * Daniel Sendula, - * RasPelikan - * @version $Id: $Id */ public interface IODataWriter { @@ -57,7 +50,6 @@ public interface IODataWriter { * Write a single raw byte value. * * @param b byte to be written - * @return a int. */ int write(byte b); @@ -65,7 +57,6 @@ public interface IODataWriter { * Write a single raw byte value. * * @param b integer value that will be cast to a byte and written - * @return a int. */ default int write(int b) { return write((byte)b); @@ -470,7 +461,6 @@ default int write(Charset charset, char ... data) { * * @param data collection of character sequences of data to be written * @return The number of bytes written, possibly zero - * @param charset a {@link java.nio.charset.Charset} object. */ default int write(Charset charset, Collection data) { try { diff --git a/pi4j-core/src/main/java/com/pi4j/io/IODeviceConfigBuilder.java b/pi4j-core/src/main/java/com/pi4j/io/IODeviceConfigBuilder.java index c7a063b9..ee5db097 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/IODeviceConfigBuilder.java +++ b/pi4j-core/src/main/java/com/pi4j/io/IODeviceConfigBuilder.java @@ -31,8 +31,6 @@ /** *

    IOConfigBuilder interface.

    * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id * @param * @param */ diff --git a/pi4j-core/src/main/java/com/pi4j/io/IOType.java b/pi4j-core/src/main/java/com/pi4j/io/IOType.java index 9931a8cd..376f37fb 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/IOType.java +++ b/pi4j-core/src/main/java/com/pi4j/io/IOType.java @@ -41,12 +41,6 @@ import java.lang.reflect.Method; -/** - *

    IOType class.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id - */ public enum IOType { DIGITAL_INPUT(DigitalInputProvider.class, DigitalInput.class, DigitalInputConfig.class, DigitalInputConfigBuilder.class), @@ -72,26 +66,17 @@ public enum IOType { /** *

    Getter for the field providerClass.

    - * - * @return a {@link java.lang.Class} object. */ public Class getProviderClass() { return providerClass; } - /** - *

    getIOClass.

    - * - * @return a {@link java.lang.Class} object. - */ public Class getIOClass() { return ioClass; } /** *

    Getter for the field configClass.

    - * - * @return a {@link java.lang.Class} object. */ public Class getConfigClass() { return configClass; @@ -99,8 +84,6 @@ public Class getConfigClass() { /** *

    Getter for the field configBuilderClass.

    - * - * @return a {@link java.lang.Class} object. */ public Class getConfigBuilderClass() { return configBuilderClass; @@ -115,22 +98,10 @@ public CB newConfigBuilder(Context context) { } } - /** - *

    isType.

    - * - * @param type a {@link com.pi4j.io.IOType} object. - * @return a boolean. - */ public boolean isType(IOType type) { return type == this; } - /** - *

    getIOClass.

    - * - * @param type a {@link com.pi4j.io.IOType} object. - * @return a {@link java.lang.Class} object. - */ public static Class getIOClass(IOType type) { for (var typeInstance : IOType.values()) { if (typeInstance.equals(type)) { @@ -142,9 +113,6 @@ public static Class getIOClass(IOType type) { /** *

    Getter for the field providerClass.

    - * - * @param type a {@link com.pi4j.io.IOType} object. - * @return a {@link java.lang.Class} object. */ public static Class getProviderClass(IOType type) { for (var typeInstance : IOType.values()) { @@ -157,9 +125,6 @@ public static Class getProviderClass(IOType type) { /** *

    Getter for the field configClass.

    - * - * @param type a {@link com.pi4j.io.IOType} object. - * @return a {@link java.lang.Class} object. */ public static Class getConfigClass(IOType type) { for (var typeInstance : IOType.values()) { @@ -170,12 +135,6 @@ public static Class getConfigClass(IOType type) { return null; } - /** - *

    getByProviderClass.

    - * - * @param name a {@link java.lang.String} object. - * @return a {@link com.pi4j.io.IOType} object. - */ public static IOType getByProviderClass(String name) { for (var type : IOType.values()) { if (type.name().equalsIgnoreCase(name)) { @@ -185,22 +144,10 @@ public static IOType getByProviderClass(String name) { return null; } - /** - *

    getByIO.

    - * - * @param provider a {@link com.pi4j.provider.Provider} object. - * @return a {@link com.pi4j.io.IOType} object. - */ public static IOType getByIO(Provider provider) { return provider.type(); } - /** - *

    getByProviderClass.

    - * - * @param providerClass a {@link java.lang.Class} object. - * @return a {@link com.pi4j.io.IOType} object. - */ public static IOType getByProviderClass(Class providerClass) { for (var type : IOType.values()) { if (type.getProviderClass().isAssignableFrom(providerClass)) { @@ -210,22 +157,10 @@ public static IOType getByProviderClass(Class providerClass) return null; } - /** - *

    getByIO.

    - * - * @param io a {@link com.pi4j.io.IO} object. - * @return a {@link com.pi4j.io.IOType} object. - */ public static IOType getByIO(IO io) { return io.type(); } - /** - *

    getByIOClass.

    - * - * @param ioClass a {@link java.lang.Class} object. - * @return a {@link com.pi4j.io.IOType} object. - */ public static IOType getByIOClass(Class ioClass) { for (var type : IOType.values()) { if (type.getIOClass().isAssignableFrom(ioClass)) { @@ -235,12 +170,6 @@ public static IOType getByIOClass(Class ioClass) { return null; } - /** - *

    getByConfigClass.

    - * - * @param configClass a {@link java.lang.Class} object. - * @return a {@link com.pi4j.io.IOType} object. - */ public static IOType getByConfigClass(Class configClass) { for (var type : IOType.values()) { if (type.getConfigClass().isAssignableFrom(configClass)) { @@ -250,12 +179,6 @@ public static IOType getByConfigClass(Class configClass) { return null; } - /** - *

    parse.

    - * - * @param ioType a {@link java.lang.String} object. - * @return a {@link com.pi4j.io.IOType} object. - */ public static IOType parse(String ioType) { try { diff --git a/pi4j-core/src/main/java/com/pi4j/io/Input.java b/pi4j-core/src/main/java/com/pi4j/io/Input.java index 0e2e477c..f66b3fdd 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/Input.java +++ b/pi4j-core/src/main/java/com/pi4j/io/Input.java @@ -28,9 +28,6 @@ /** *

    Input interface.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface Input { // MARKER INTERFACE diff --git a/pi4j-core/src/main/java/com/pi4j/io/Output.java b/pi4j-core/src/main/java/com/pi4j/io/Output.java index 5a4d5aff..de4ec8fd 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/Output.java +++ b/pi4j-core/src/main/java/com/pi4j/io/Output.java @@ -27,9 +27,6 @@ /** *

    Output interface.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface Output { // MARKER INTERFACE diff --git a/pi4j-core/src/main/java/com/pi4j/io/exception/IOAlreadyExistsException.java b/pi4j-core/src/main/java/com/pi4j/io/exception/IOAlreadyExistsException.java index 9f838096..f77714f7 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/exception/IOAlreadyExistsException.java +++ b/pi4j-core/src/main/java/com/pi4j/io/exception/IOAlreadyExistsException.java @@ -32,16 +32,11 @@ *

    * * @see http://www.pi4j.com/ - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public class IOAlreadyExistsException extends IOException { /** * Default Constructor - * - * @param id a {@link java.lang.String} object. */ public IOAlreadyExistsException(String id){ super("IO instance [" + id + "] already exists in the Pi4J runtime context; unable to create a new instance using this reserved id."); diff --git a/pi4j-core/src/main/java/com/pi4j/io/exception/IOBoundsException.java b/pi4j-core/src/main/java/com/pi4j/io/exception/IOBoundsException.java index 3334cebe..f01f7f44 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/exception/IOBoundsException.java +++ b/pi4j-core/src/main/java/com/pi4j/io/exception/IOBoundsException.java @@ -32,18 +32,11 @@ *

    * * @see http://www.pi4j.com/ - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public class IOBoundsException extends IOException { /** * Default Constructor - * - * @param value a {@link java.lang.Integer} object. - * @param min a {@link java.lang.Integer} object. - * @param max a {@link java.lang.Integer} object. */ public IOBoundsException(Integer value, Integer min, Integer max){ super("The requested value [" diff --git a/pi4j-core/src/main/java/com/pi4j/io/exception/IOException.java b/pi4j-core/src/main/java/com/pi4j/io/exception/IOException.java index c7d5b352..2497a4d6 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/exception/IOException.java +++ b/pi4j-core/src/main/java/com/pi4j/io/exception/IOException.java @@ -34,9 +34,6 @@ *

    * * @see http://www.pi4j.com/ - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public class IOException extends Pi4JException { @@ -49,21 +46,10 @@ public IOException(String message){ super(message); } - /** - *

    Constructor for IOException.

    - * - * @param cause a {@link java.lang.Throwable} object. - */ public IOException(Throwable cause){ super(cause); } - /** - *

    Constructor for IOException.

    - * - * @param message a {@link java.lang.String} object. - * @param cause a {@link java.lang.Throwable} object. - */ public IOException(String message, Throwable cause){ super(message,cause); } diff --git a/pi4j-core/src/main/java/com/pi4j/io/exception/IOIllegalValueException.java b/pi4j-core/src/main/java/com/pi4j/io/exception/IOIllegalValueException.java index b5d2bb6b..d3be7ba2 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/exception/IOIllegalValueException.java +++ b/pi4j-core/src/main/java/com/pi4j/io/exception/IOIllegalValueException.java @@ -32,9 +32,6 @@ *

    * * @see http://www.pi4j.com/ - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public class IOIllegalValueException extends IOException { diff --git a/pi4j-core/src/main/java/com/pi4j/io/exception/IOInvalidIDException.java b/pi4j-core/src/main/java/com/pi4j/io/exception/IOInvalidIDException.java index 88d1d22d..b5052014 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/exception/IOInvalidIDException.java +++ b/pi4j-core/src/main/java/com/pi4j/io/exception/IOInvalidIDException.java @@ -32,9 +32,6 @@ *

    * * @see http://www.pi4j.com/ - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public class IOInvalidIDException extends IOException { diff --git a/pi4j-core/src/main/java/com/pi4j/io/exception/IONotFoundException.java b/pi4j-core/src/main/java/com/pi4j/io/exception/IONotFoundException.java index 8ae2ddcf..3c1e47df 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/exception/IONotFoundException.java +++ b/pi4j-core/src/main/java/com/pi4j/io/exception/IONotFoundException.java @@ -33,16 +33,11 @@ *

    * * @see http://www.pi4j.com/ - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public class IONotFoundException extends IOException { /** * Default Constructor - * - * @param id a {@link java.lang.String} object. */ public IONotFoundException(String id){ super("IO instance [" + id + "] not found in Pi4J Registry."); diff --git a/pi4j-core/src/main/java/com/pi4j/io/exception/IOReadException.java b/pi4j-core/src/main/java/com/pi4j/io/exception/IOReadException.java index 187fc17a..b3198c6e 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/exception/IOReadException.java +++ b/pi4j-core/src/main/java/com/pi4j/io/exception/IOReadException.java @@ -33,16 +33,11 @@ *

    * * @see http://www.pi4j.com/ - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public class IOReadException extends IOException { /** * Default Constructor - * - * @param message a {@link java.lang.String} object. */ public IOReadException(String message){ super(message); @@ -50,8 +45,6 @@ public IOReadException(String message){ /** * Alternate Constructor - * - * @param error a int. */ public IOReadException(int error){ super("I/O READ ERROR: " + error); diff --git a/pi4j-core/src/main/java/com/pi4j/io/exception/IOShutdownException.java b/pi4j-core/src/main/java/com/pi4j/io/exception/IOShutdownException.java index 2ab43b0a..65af35ee 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/exception/IOShutdownException.java +++ b/pi4j-core/src/main/java/com/pi4j/io/exception/IOShutdownException.java @@ -35,17 +35,11 @@ *

    * * @see http://www.pi4j.com/ - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public class IOShutdownException extends IOException { /** * Default Constructor - * - * @param instance a {@link com.pi4j.io.IO} object. - * @param e a {@link java.lang.Exception} object. */ public IOShutdownException(IO instance, Exception e){ super("IO instance [" + instance.getId() + "] failed to properly shutdown: " + e.getMessage(), e); diff --git a/pi4j-core/src/main/java/com/pi4j/io/gpio/Gpio.java b/pi4j-core/src/main/java/com/pi4j/io/gpio/Gpio.java index c8af9732..2df92c68 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/gpio/Gpio.java +++ b/pi4j-core/src/main/java/com/pi4j/io/gpio/Gpio.java @@ -34,8 +34,6 @@ * @param * @param * @param - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface Gpio, CONFIG_TYPE extends GpioConfig, diff --git a/pi4j-core/src/main/java/com/pi4j/io/gpio/GpioBase.java b/pi4j-core/src/main/java/com/pi4j/io/gpio/GpioBase.java index 9672fcf5..2efb7625 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/gpio/GpioBase.java +++ b/pi4j-core/src/main/java/com/pi4j/io/gpio/GpioBase.java @@ -34,27 +34,16 @@ * @param * @param * @param - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public abstract class GpioBase, CONFIG_TYPE extends GpioConfig, PROVIDER_TYPE extends Provider> extends IOBase implements Gpio { - /** - *

    Constructor for GpioBase.

    - * - * @param provider a PROVIDER_TYPE object. - * @param config a CONFIG_TYPE object. - */ public GpioBase(PROVIDER_TYPE provider, CONFIG_TYPE config) { super(provider, config); } - /** - * {@inheritDoc} - */ @Override public String toString() { StringBuilder result = new StringBuilder(); diff --git a/pi4j-core/src/main/java/com/pi4j/io/gpio/GpioConfig.java b/pi4j-core/src/main/java/com/pi4j/io/gpio/GpioConfig.java index 397c5cca..95c7d1a0 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/gpio/GpioConfig.java +++ b/pi4j-core/src/main/java/com/pi4j/io/gpio/GpioConfig.java @@ -34,8 +34,6 @@ *

    GpioConfig interface.

    * * @param - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface GpioConfig extends BusConfig, BcmConfig, IOConfig { diff --git a/pi4j-core/src/main/java/com/pi4j/io/gpio/GpioConfigBuilder.java b/pi4j-core/src/main/java/com/pi4j/io/gpio/GpioConfigBuilder.java index 6cb1ad67..7e09256d 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/gpio/GpioConfigBuilder.java +++ b/pi4j-core/src/main/java/com/pi4j/io/gpio/GpioConfigBuilder.java @@ -32,8 +32,6 @@ * * @param * @param - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface GpioConfigBuilder extends IOBcmConfigBuilder { diff --git a/pi4j-core/src/main/java/com/pi4j/io/gpio/GpioProvider.java b/pi4j-core/src/main/java/com/pi4j/io/gpio/GpioProvider.java index 82846272..2333fa61 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/gpio/GpioProvider.java +++ b/pi4j-core/src/main/java/com/pi4j/io/gpio/GpioProvider.java @@ -31,8 +31,6 @@ /** *

    GpioProvider interface.

    * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id * @param * @param * @param diff --git a/pi4j-core/src/main/java/com/pi4j/io/gpio/GpioProviderBase.java b/pi4j-core/src/main/java/com/pi4j/io/gpio/GpioProviderBase.java index bb6e35ac..77bc7f1f 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/gpio/GpioProviderBase.java +++ b/pi4j-core/src/main/java/com/pi4j/io/gpio/GpioProviderBase.java @@ -30,8 +30,6 @@ /** *

    Abstract GpioProviderBase class.

    * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id * @param * @param * @param @@ -43,28 +41,14 @@ public abstract class GpioProviderBase< extends ProviderBase implements GpioProvider { - /** - *

    Constructor for GpioProviderBase.

    - */ public GpioProviderBase(){ super(); } - /** - *

    Constructor for GpioProviderBase.

    - * - * @param id a {@link java.lang.String} object. - */ public GpioProviderBase(String id){ super(id); } - /** - *

    Constructor for GpioProviderBase.

    - * - * @param id a {@link java.lang.String} object. - * @param name a {@link java.lang.String} object. - */ public GpioProviderBase(String id, String name){ super(id, name); } diff --git a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/Digital.java b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/Digital.java index c32ba3db..883e659b 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/Digital.java +++ b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/Digital.java @@ -34,8 +34,6 @@ * @param * @param * @param - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface Digital, CONFIG_TYPE extends DigitalConfig, @@ -43,137 +41,56 @@ public interface Digital, ListenableOnOffRead { - /** - *

    state.

    - * - * @return a {@link com.pi4j.io.gpio.digital.DigitalState} object. - */ DigitalState state(); default Integer bcm() { return config().bcm(); } - /** - *

    addListener.

    - * - * @param listener a {@link DigitalStateChangeListener} object. - * @return a DIGITAL_TYPE object. - */ DIGITAL_TYPE addListener(DigitalStateChangeListener... listener); - /** - *

    removeListener.

    - * - * @param listener a {@link DigitalStateChangeListener} object. - * @return a DIGITAL_TYPE object. - */ DIGITAL_TYPE removeListener(DigitalStateChangeListener... listener); - /** - *

    equals.

    - * - * @param state a {@link com.pi4j.io.gpio.digital.DigitalState} object. - * @return a boolean. - */ default boolean equals(DigitalState state) { return this.state().equals(state); } - /** - *

    equals.

    - * - * @param state a {@link java.lang.Number} object. - * @return a boolean. - */ default boolean equals(Number state) { return equals(DigitalState.getState(state)); } - /** - *

    equals.

    - * - * @param state a boolean. - * @return a boolean. - */ default boolean equals(boolean state) { return equals(DigitalState.getState(state)); } - /** - *

    equals.

    - * - * @param state a byte. - * @return a boolean. - */ default boolean equals(byte state) { return equals(DigitalState.getState(state)); } - /** - *

    equals.

    - * - * @param state a short. - * @return a boolean. - */ default boolean equals(short state) { return equals(DigitalState.getState(state)); } - /** - *

    equals.

    - * - * @param state a int. - * @return a boolean. - */ default boolean equals(int state) { return equals(DigitalState.getState(state)); } - /** - *

    equals.

    - * - * @param state a long. - * @return a boolean. - */ default boolean equals(long state) { return equals(DigitalState.getState(state)); } - /** - *

    equals.

    - * - * @param state a float. - * @return a boolean. - */ default boolean equals(float state) { return equals(DigitalState.getState(state)); } - /** - *

    equals.

    - * - * @param state a double. - * @return a boolean. - */ default boolean equals(double state) { return equals(DigitalState.getState(state)); } - /** - *

    isHigh.

    - * - * @return a boolean. - */ default boolean isHigh() { return this.state().isHigh(); } - /** - *

    isLow.

    - * - * @return a boolean. - */ default boolean isLow() { return this.state().isLow(); } diff --git a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalBase.java b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalBase.java index 59455b34..038f709e 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalBase.java +++ b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalBase.java @@ -36,8 +36,6 @@ /** *

    Abstract DigitalBase class.

    * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id * @param * @param * @param @@ -51,12 +49,6 @@ public abstract class DigitalBase stateChangeEventManager; - /** - *

    Constructor for DigitalBase.

    - * - * @param provider a PROVIDER_TYPE object. - * @param config a CONFIG_TYPE object. - */ public DigitalBase(PROVIDER_TYPE provider, CONFIG_TYPE config){ super(provider,config); @@ -80,14 +72,12 @@ public DIGITAL_TYPE removeConsumer(Consumer listener) { return (DIGITAL_TYPE) this; } - /** {@inheritDoc} */ @Override public DIGITAL_TYPE addListener(DigitalStateChangeListener... listener) { stateChangeEventManager.add(listener); return (DIGITAL_TYPE)this; } - /** {@inheritDoc} */ @Override public DIGITAL_TYPE removeListener(DigitalStateChangeListener... listener) { stateChangeEventManager.remove(listener); @@ -108,7 +98,6 @@ protected void dispatch(DigitalStateChangeEvent event){ stateChangeEventManager.dispatch(event); } - /** {@inheritDoc} */ @Override public DIGITAL_TYPE shutdownInternal(Context context) throws ShutdownException { // remove all listeners @@ -118,7 +107,6 @@ public DIGITAL_TYPE shutdownInternal(Context context) throws ShutdownException { return (DIGITAL_TYPE) this; } - /** {@inheritDoc} */ @Override public boolean isOn() { // the default ON state is HIGH diff --git a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalConfig.java b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalConfig.java index 58cd1a35..c3141278 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalConfig.java +++ b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalConfig.java @@ -32,8 +32,6 @@ *

    DigitalConfig interface.

    * * @param - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface DigitalConfig extends GpioConfig { @@ -42,25 +40,10 @@ public interface DigitalConfig extends GpioConfigpin.

    - * - * @return a {@link Integer} object. - */ Integer bcm(); - /** - *

    onState.

    - * - * @return a {@link com.pi4j.io.gpio.digital.DigitalState} object. - */ DigitalState onState(); - /** - *

    getOnState.

    - * - * @return a {@link com.pi4j.io.gpio.digital.DigitalState} object. - */ default DigitalState getOnState() { return this.onState(); } diff --git a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalConfigBuilder.java b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalConfigBuilder.java index a36e7f9f..70150662 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalConfigBuilder.java +++ b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalConfigBuilder.java @@ -32,15 +32,11 @@ * * @param * @param - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface DigitalConfigBuilder extends GpioConfigBuilder { /** - * @param address a {@link java.lang.Integer} object. - * @return a BUILDER_TYPE object. * @deprecated use {@link #bcm(Integer)} bcm} instead. */ @Deprecated(forRemoval = true) @@ -48,19 +44,7 @@ default BUILDER_TYPE address(Integer address) { return bcm(address); } - /** - *

    bcm.

    - * - * @param bcm a {@link java.lang.Integer} object. - * @return a BUILDER_TYPE object. - */ BUILDER_TYPE bcm(Integer bcm); - /** - *

    pull.

    - * - * @param state a {@link com.pi4j.io.gpio.digital.DigitalState} object. - * @return a {@link BUILDER_TYPE} object. - */ BUILDER_TYPE onState(DigitalState state); } diff --git a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalEvent.java b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalEvent.java index 50ed3bf7..e37381d5 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalEvent.java +++ b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalEvent.java @@ -30,8 +30,6 @@ /** *

    DigitalEvent interface.

    * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id * @param * @param * @param @@ -40,10 +38,5 @@ public interface DigitalEvent, PROVIDER_TYPE extends DigitalProvider> extends Event { - /** - *

    source.

    - * - * @return a DIGITAL_TYPE object. - */ DIGITAL_TYPE source(); } diff --git a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalEventListener.java b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalEventListener.java index 88b89b31..80a4b04b 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalEventListener.java +++ b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalEventListener.java @@ -29,9 +29,6 @@ /** *

    DigitalEventListener interface.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface DigitalEventListener extends Listener { // MARKER INTERFACE diff --git a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalInput.java b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalInput.java index 126ddd99..064f3a85 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalInput.java +++ b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalInput.java @@ -31,28 +31,14 @@ /** *

    DigitalInput interface.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface DigitalInput extends Digital, Input { /** Constant DEFAULT_DEBOUNCE=10000 */ long DEFAULT_DEBOUNCE = 10000; - /** - *

    newConfigBuilder.

    - * - * @param context {@link Context} - * @return a {@link com.pi4j.io.gpio.digital.DigitalInputConfigBuilder} object. - */ static DigitalInputConfigBuilder newConfigBuilder(Context context){ return DigitalInputConfigBuilder.newInstance(); } - /** - *

    pull.

    - * - * @return a {@link com.pi4j.io.gpio.digital.PullResistance} object. - */ default PullResistance pull() { return config().pull(); } } diff --git a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalInputBase.java b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalInputBase.java index 13b10706..5f2e7ca1 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalInputBase.java +++ b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalInputBase.java @@ -27,17 +27,8 @@ /** *

    Abstract DigitalInputBase class.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public abstract class DigitalInputBase extends DigitalBase implements DigitalInput { - /** - *

    Constructor for DigitalInputBase.

    - * - * @param provider a {@link com.pi4j.io.gpio.digital.DigitalInputProvider} object. - * @param config a {@link com.pi4j.io.gpio.digital.DigitalInputConfig} object. - */ public DigitalInputBase(DigitalInputProvider provider, DigitalInputConfig config){ super(provider, config); } diff --git a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalInputConfig.java b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalInputConfig.java index ffaaec59..74541e98 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalInputConfig.java +++ b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalInputConfig.java @@ -30,9 +30,6 @@ /** *

    DigitalInputConfig interface.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface DigitalInputConfig extends DigitalConfig { @@ -41,39 +38,15 @@ public interface DigitalInputConfig extends DigitalConfig { /** Constant DEBOUNCE_RESISTANCE_KEY="debounce" */ String DEBOUNCE_RESISTANCE_KEY = "debounce"; - /** - *

    pull.

    - * - * @return a {@link com.pi4j.io.gpio.digital.PullResistance} object. - */ PullResistance pull(); - /** - *

    getPull.

    - * - * @return a {@link com.pi4j.io.gpio.digital.PullResistance} object. - */ default PullResistance getPull(){ return pull(); } - /** - *

    debounce.

    - * - * @return a {@link java.lang.Long} object. - */ Long debounce(); - /** - *

    getDebounce.

    - * - * @return a {@link java.lang.Long} object. - */ default Long getDebounce(){ return debounce(); } /** - *

    newBuilder.

    - * - * @param context {@link Context} - * @return a {@link com.pi4j.io.gpio.digital.DigitalInputConfigBuilder} object. * @deprecated As of version 5, please use {@link #newBuilder()} instead. */ @Deprecated diff --git a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalInputConfigBuilder.java b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalInputConfigBuilder.java index 7e89f4fa..acb0267c 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalInputConfigBuilder.java +++ b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalInputConfigBuilder.java @@ -32,46 +32,20 @@ /** *

    DigitalInputConfigBuilder interface.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface DigitalInputConfigBuilder extends DigitalConfigBuilder { DigitalInputConfigBuilder bcm(Integer bcm); - /** - *

    pull.

    - * - * @param value a {@link com.pi4j.io.gpio.digital.PullResistance} object. - * @return a {@link com.pi4j.io.gpio.digital.DigitalInputConfigBuilder} object. - */ DigitalInputConfigBuilder pull(PullResistance value); /** - *

    debounce.

    - * - * @param microseconds a {@link java.lang.Long} object. - * @return a {@link com.pi4j.io.gpio.digital.DigitalInputConfigBuilder} object. * @see com.pi4j.io.gpio.digital.DigitalInput#DEFAULT_DEBOUNCE DEFAULT_DEBOUNCE */ DigitalInputConfigBuilder debounce(Long microseconds); - /** - *

    debounce.

    - * - * @param interval a {@link java.lang.Long} object. - * @param units a {@link java.util.concurrent.TimeUnit} object. - * @return a {@link com.pi4j.io.gpio.digital.DigitalInputConfigBuilder} object. - */ DigitalInputConfigBuilder debounce(Long interval, TimeUnit units); - /** - *

    newInstance.

    - * - * @param context {@link Context} - * @return a {@link com.pi4j.io.gpio.digital.DigitalInputConfigBuilder} object. - */ @Deprecated static DigitalInputConfigBuilder newInstance(Context context) { return DefaultDigitalInputConfigBuilder.newInstance(context); diff --git a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalInputProvider.java b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalInputProvider.java index 0c55f77c..80c91ec1 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalInputProvider.java +++ b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalInputProvider.java @@ -27,30 +27,13 @@ /** *

    DigitalInputProvider interface.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface DigitalInputProvider extends DigitalProvider { - /** - *

    create.

    - * - * @param builder a {@link com.pi4j.io.gpio.digital.DigitalInputConfigBuilder} object. - * @param a T object. - * @return a T object. - */ default T create(DigitalInputConfigBuilder builder) { return (T) create(builder.build()); } - /** - *

    create.

    - * - * @param bcm a {@link java.lang.Integer} object. - * @param a T object. - * @return a T object. - */ default T create(Integer bcm) { var config = DigitalInput.newConfigBuilder(context()) .bcm(bcm) @@ -58,14 +41,6 @@ default T create(Integer bcm) { return (T) create(config); } - /** - *

    create.

    - * - * @param bcm a {@link java.lang.Integer} object. - * @param id pin@link java.lang.String} object. - * @param a T object. - * @return a T object. - */ default T create(Integer bcm, String id) { var config = DigitalInput.newConfigBuilder(context()) .bcm(bcm) @@ -74,15 +49,6 @@ default T create(Integer bcm, String id) { return (T) create(config); } - /** - *

    create.

    - * - * @param bcm a {@link java.lang.Integer} object. - * @param id a {@link java.lang.String} object. - * @param name a {@link java.lang.String} object. - * @param a T object. - * @return a T object. - */ default T create(Integer bcm, String id, String name) { var config = DigitalInput.newConfigBuilder(context()) .bcm(bcm) @@ -92,16 +58,6 @@ default T create(Integer bcm, String id, String name) { return (T) create(config); } - /** - *

    create.

    - * - * @param bcm a {@link java.lang.Integer} object. - * @param id a {@link java.lang.String} object. - * @param name a {@link java.lang.String} object. - * @param description a {@link java.lang.String} object. - * @param a T object. - * @return a T object. - */ default T create(Integer bcm, String id, String name, String description) { var config = DigitalInput.newConfigBuilder(context()) .bcm(bcm) diff --git a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalInputProviderBase.java b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalInputProviderBase.java index 1a9484a6..589227d7 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalInputProviderBase.java +++ b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalInputProviderBase.java @@ -26,36 +26,19 @@ */ /** *

    Abstract DigitalInputProviderBase class.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public abstract class DigitalInputProviderBase extends DigitalProviderBase implements DigitalInputProvider { - /** - *

    Constructor for DigitalInputProviderBase.

    - */ public DigitalInputProviderBase(){ super(); } - /** - *

    Constructor for DigitalInputProviderBase.

    - * - * @param id a {@link java.lang.String} object. - */ public DigitalInputProviderBase(String id){ super(id); } - /** - *

    Constructor for DigitalInputProviderBase.

    - * - * @param id a {@link java.lang.String} object. - * @param name a {@link java.lang.String} object. - */ public DigitalInputProviderBase(String id, String name){ super(id, name); } diff --git a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalListener.java b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalListener.java index 9e106eb9..9e7094aa 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalListener.java +++ b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalListener.java @@ -30,8 +30,6 @@ /** *

    DigitalListener interface.

    * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id * @param */ public interface DigitalListener extends Listener { diff --git a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalOutput.java b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalOutput.java index 9af43a47..3ee80f57 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalOutput.java +++ b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalOutput.java @@ -36,20 +36,11 @@ /** *

    DigitalOutput interface.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface DigitalOutput extends Digital, Output, OnOff { - /** - *

    newConfigBuilder.

    - * - * @param context {@link Context} - * @return a {@link com.pi4j.io.gpio.digital.DigitalOutputConfigBuilder} object. - */ @Deprecated static DigitalOutputConfigBuilder newConfigBuilder(Context context){ return DigitalOutputConfigBuilder.newInstance(context); @@ -59,151 +50,72 @@ static DigitalOutputConfigBuilder newConfigBuilder(){ return DigitalOutputConfigBuilder.newInstance(); } - /** - *

    newBuilder.

    - * - * @param context a {@link com.pi4j.context.Context} object. - * @return a {@link com.pi4j.io.gpio.digital.DigitalOutputBuilder} object. - */ static DigitalOutputBuilder newBuilder(Context context){ return DigitalOutputBuilder.newInstance(context); } /** - *

    state.

    - * - * @param state a {@link com.pi4j.io.gpio.digital.DigitalState} object. - * @return a {@link com.pi4j.io.gpio.digital.DigitalOutput} object. * @throws IOException if any. */ DigitalOutput state(DigitalState state) throws IOException; /** - *

    pulse.

    - * - * @param interval a int. - * @param unit a {@link java.util.concurrent.TimeUnit} object. - * @param state a {@link com.pi4j.io.gpio.digital.DigitalState} object. - * @param callback a {@link java.util.concurrent.Callable} object. - * @return a {@link com.pi4j.io.gpio.digital.DigitalOutput} object. * @throws IOException if any. */ DigitalOutput pulse(int interval, TimeUnit unit, DigitalState state, Callable callback) throws IOException; - /** - *

    pulseAsync.

    - * - * @param interval a int. - * @param unit a {@link java.util.concurrent.TimeUnit} object. - * @param state a {@link com.pi4j.io.gpio.digital.DigitalState} object. - * @param callback a {@link java.util.concurrent.Callable} object. - * @return a {@link java.util.concurrent.Future} object. - */ Future pulseAsync(int interval, TimeUnit unit, DigitalState state, Callable callback); - /** - *

    blink.

    - * - * @param delay a int. - * @param duration a int. - * @param unit a {@link java.util.concurrent.TimeUnit} object. - * @param state a {@link com.pi4j.io.gpio.digital.DigitalState} object. - * @param callback a {@link java.util.concurrent.Callable} object. - * @return a {@link com.pi4j.io.gpio.digital.DigitalOutput} object. - */ DigitalOutput blink(int delay, int duration, TimeUnit unit, DigitalState state, Callable callback); - /** - *

    blinkAsync.

    - * - * @param delay a int. - * @param duration a int. - * @param unit a {@link java.util.concurrent.TimeUnit} object. - * @param state a {@link com.pi4j.io.gpio.digital.DigitalState} object. - * @param callback a {@link java.util.concurrent.Callable} object. - * @return a {@link java.util.concurrent.Future} object. - */ Future blinkAsync(int delay, int duration, TimeUnit unit, DigitalState state, Callable callback); /** - *

    setState.

    - * - * @param state a byte. - * @return a {@link com.pi4j.io.gpio.digital.DigitalOutput} object. * @throws IOException if any. */ default DigitalOutput setState(byte state) throws IOException { return this.state(DigitalState.getState(state)); } /** - *

    setState.

    - * - * @param state a short. - * @return a {@link com.pi4j.io.gpio.digital.DigitalOutput} object. * @throws IOException if any. */ default DigitalOutput setState(short state) throws IOException { return this.state(DigitalState.getState(state)); } /** - *

    setState.

    - * - * @param state a int. - * @return a {@link com.pi4j.io.gpio.digital.DigitalOutput} object. * @throws IOException if any. */ default DigitalOutput setState(int state) throws IOException { return this.state(DigitalState.getState(state)); } /** - *

    setState.

    - * - * @param state a long. - * @return a {@link com.pi4j.io.gpio.digital.DigitalOutput} object. * @throws IOException if any. */ default DigitalOutput setState(long state) throws IOException { return this.state(DigitalState.getState(state)); } /** - *

    setState.

    - * - * @param state a float. - * @return a {@link com.pi4j.io.gpio.digital.DigitalOutput} object. * @throws IOException if any. */ default DigitalOutput setState(float state) throws IOException { return this.state(DigitalState.getState(state)); } /** - *

    setState.

    - * - * @param state a double. - * @return a {@link com.pi4j.io.gpio.digital.DigitalOutput} object. * @throws IOException if any. */ default DigitalOutput setState(double state) throws IOException { return this.state(DigitalState.getState(state)); } /** - *

    high.

    - * - * @return a {@link com.pi4j.io.gpio.digital.DigitalOutput} object. * @throws IOException if any. */ default DigitalOutput high() throws IOException { return this.state(DigitalState.HIGH); } /** - *

    low.

    - * - * @return a {@link com.pi4j.io.gpio.digital.DigitalOutput} object. * @throws IOException if any. */ default DigitalOutput low() throws IOException { return this.state(DigitalState.LOW); } /** - *

    toggle.

    - * - * @return a {@link com.pi4j.io.gpio.digital.DigitalOutput} object. * @throws IOException if any. */ default DigitalOutput toggle() throws IOException { @@ -211,162 +123,62 @@ default DigitalOutput toggle() throws IOException { } /** - *

    pulseHigh.

    - * - * @param interval a int. - * @param unit a {@link java.util.concurrent.TimeUnit} object. - * @return a {@link com.pi4j.io.gpio.digital.DigitalOutput} object. * @throws IOException if any. */ default DigitalOutput pulseHigh(int interval, TimeUnit unit) throws IOException { return pulse(interval, unit, DigitalState.HIGH); } /** - *

    pulseLow.

    - * - * @param interval a int. - * @param unit a {@link java.util.concurrent.TimeUnit} object. - * @return a {@link com.pi4j.io.gpio.digital.DigitalOutput} object. * @throws com.pi4j.io.exception.IOException if any. */ default DigitalOutput pulseLow(int interval, TimeUnit unit) throws IOException { return pulse(interval, unit, DigitalState.LOW); } - /** - *

    pulseHighAsync.

    - * - * @param interval a int. - * @param unit a {@link java.util.concurrent.TimeUnit} object. - * @param callback a {@link java.util.concurrent.Callable} object. - * @return a {@link java.util.concurrent.Future} object. - */ default Future pulseHighAsync(int interval, TimeUnit unit, Callable callback){ return pulseAsync(interval, unit, DigitalState.HIGH, callback); } - /** - *

    pulseLowAsync.

    - * - * @param interval a int. - * @param unit a {@link java.util.concurrent.TimeUnit} object. - * @param callback a {@link java.util.concurrent.Callable} object. - * @return a {@link java.util.concurrent.Future} object. - */ default Future pulseLowAsync(int interval, TimeUnit unit, Callable callback){ return pulseAsync(interval, unit, DigitalState.LOW, callback); } /** - *

    pulse.

    - * - * @param interval a int. - * @param unit a {@link java.util.concurrent.TimeUnit} object. - * @return a {@link com.pi4j.io.gpio.digital.DigitalOutput} object. * @throws com.pi4j.io.exception.IOException if any. */ default DigitalOutput pulse(int interval, TimeUnit unit) throws IOException { return pulse(interval, unit, DigitalState.HIGH); } /** - *

    pulse.

    - * - * @param interval a int. - * @param unit a {@link java.util.concurrent.TimeUnit} object. - * @param state a {@link com.pi4j.io.gpio.digital.DigitalState} object. - * @return a {@link com.pi4j.io.gpio.digital.DigitalOutput} object. * @throws com.pi4j.io.exception.IOException if any. */ default DigitalOutput pulse(int interval, TimeUnit unit, DigitalState state) throws IOException { return pulse(interval, unit, state, null); } - /** - *

    pulseAsync.

    - * - * @param interval a int. - * @param unit a {@link java.util.concurrent.TimeUnit} object. - * @return a {@link java.util.concurrent.Future} object. - */ default Future pulseAsync(int interval, TimeUnit unit){ return pulseAsync(interval, unit, DigitalState.HIGH); } - /** - *

    pulseAsync.

    - * - * @param interval a int. - * @param unit a {@link java.util.concurrent.TimeUnit} object. - * @param state a {@link com.pi4j.io.gpio.digital.DigitalState} object. - * @return a {@link java.util.concurrent.Future} object. - */ default Future pulseAsync(int interval, TimeUnit unit, DigitalState state){ return pulseAsync(interval, unit, state, null); } - /** - *

    blink.

    - * - * @param interval a int. - * @param unit a {@link java.util.concurrent.TimeUnit} object. - * @return a {@link com.pi4j.io.gpio.digital.DigitalOutput} object. - */ default DigitalOutput blink(int interval, TimeUnit unit){ return this.blink(interval, interval, unit); } - /** - *

    blink.

    - * - * @param delay a int. - * @param duration a int. - * @param unit a {@link java.util.concurrent.TimeUnit} object. - * @return a {@link com.pi4j.io.gpio.digital.DigitalOutput} object. - */ default DigitalOutput blink(int delay, int duration, TimeUnit unit){ return this.blink(delay, duration, unit, DigitalState.HIGH); } - /** - *

    blink.

    - * - * @param delay a int. - * @param duration a int. - * @param unit a {@link java.util.concurrent.TimeUnit} object. - * @param state a {@link com.pi4j.io.gpio.digital.DigitalState} object. - * @return a {@link com.pi4j.io.gpio.digital.DigitalOutput} object. - */ default DigitalOutput blink(int delay, int duration, TimeUnit unit, DigitalState state){ return this.blink(delay, duration, unit, state, null); } - /** - *

    blinkAsync.

    - * - * @param interval a int. - * @param unit a {@link java.util.concurrent.TimeUnit} object. - * @return a {@link java.util.concurrent.Future} object. - */ default Future blinkAsync(int interval, TimeUnit unit){ return this.blinkAsync(interval, interval, unit, DigitalState.HIGH); } - /** - *

    blinkAsync.

    - * - * @param delay a int. - * @param duration a int. - * @param unit a {@link java.util.concurrent.TimeUnit} object. - * @return a {@link java.util.concurrent.Future} object. - */ default Future blinkAsync(int delay, int duration, TimeUnit unit){ return this.blinkAsync(delay, duration, unit, DigitalState.HIGH); } - /** - *

    blinkAsync.

    - * - * @param delay a int. - * @param duration a int. - * @param unit a {@link java.util.concurrent.TimeUnit} object. - * @param state a {@link com.pi4j.io.gpio.digital.DigitalState} object. - * @return a {@link java.util.concurrent.Future} object. - */ default Future blinkAsync(int delay, int duration, TimeUnit unit, DigitalState state){ return this.blinkAsync(delay, duration, unit, state, null); } diff --git a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalOutputBase.java b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalOutputBase.java index bd3caece..10fd972f 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalOutputBase.java +++ b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalOutputBase.java @@ -37,27 +37,15 @@ /** *

    Abstract DigitalOutputBase class.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public abstract class DigitalOutputBase extends DigitalBase implements DigitalOutput { protected DigitalState state = DigitalState.UNKNOWN; - /** - *

    Constructor for DigitalOutputBase.

    - * - * @param provider a {@link com.pi4j.io.gpio.digital.DigitalOutputProvider} object. - * @param config a {@link com.pi4j.io.gpio.digital.DigitalOutputConfig} object. - */ public DigitalOutputBase(DigitalOutputProvider provider, DigitalOutputConfig config) { super(provider, config); } - /** - * {@inheritDoc} - */ @Override public DigitalOutput initialize(Context context) throws InitializeException { super.initialize(context); @@ -73,9 +61,6 @@ public DigitalOutput initialize(Context context) throws InitializeException { return this; } - /** - * {@inheritDoc} - */ @Override public DigitalOutput state(DigitalState state) throws IOException { @@ -88,9 +73,6 @@ public DigitalOutput state(DigitalState state) throws IOException { return this; } - /** - * {@inheritDoc} - */ @Override public DigitalOutput pulse(int interval, TimeUnit unit, DigitalState state, Callable callback) throws IOException { @@ -122,9 +104,6 @@ public DigitalOutput pulse(int interval, TimeUnit unit, DigitalState state, Call return this; } - /** - * {@inheritDoc} - */ @Override public Future pulseAsync(int interval, TimeUnit unit, DigitalState state, Callable callback) { validateArguments(interval, unit); @@ -229,17 +208,11 @@ public Future blinkAsync(int delay, int duration, TimeUnit unit, DigitalState return context().submitTask(() -> blink(delay, duration, unit, state, callback)); } - /** - * {@inheritDoc} - */ @Override public DigitalState state() { return this.state; } - /** - * {@inheritDoc} - */ @Override public DigitalOutput shutdownInternal(Context context) throws ShutdownException { // set pin state to the shutdown state if a shutdown state is configured @@ -253,9 +226,6 @@ public DigitalOutput shutdownInternal(Context context) throws ShutdownException return super.shutdownInternal(context); } - /** - * {@inheritDoc} - */ @Override public DigitalOutput on() throws IOException { @@ -271,9 +241,6 @@ public DigitalOutput on() throws IOException { return state(onState); } - /** - * {@inheritDoc} - */ @Override public DigitalOutput off() throws IOException { // the default OFF state is LOW diff --git a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalOutputBuilder.java b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalOutputBuilder.java index e579c8dc..8c66c53f 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalOutputBuilder.java +++ b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalOutputBuilder.java @@ -31,84 +31,22 @@ /** *

    DigitalOutputBuilder interface.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface DigitalOutputBuilder { - /** - *

    id.

    - * - * @param id a {@link java.lang.String} object. - * @return a {@link com.pi4j.io.gpio.digital.DigitalOutputBuilder} object. - */ DigitalOutputBuilder id(String id); - /** - *

    name.

    - * - * @param name a {@link java.lang.String} object. - * @return a {@link com.pi4j.io.gpio.digital.DigitalOutputBuilder} object. - */ DigitalOutputBuilder name(String name); - /** - *

    description.

    - * - * @param description a {@link java.lang.String} object. - * @return a {@link com.pi4j.io.gpio.digital.DigitalOutputBuilder} object. - */ DigitalOutputBuilder description(String description); - /** - *

    address.

    - * - * @param address a {@link java.lang.Integer} object. - * @return a {@link com.pi4j.io.gpio.digital.DigitalOutputBuilder} object. - */ DigitalOutputBuilder address(Integer address); - /** - *

    shutdown.

    - * - * @param state a {@link com.pi4j.io.gpio.digital.DigitalState} object. - * @return a {@link com.pi4j.io.gpio.digital.DigitalOutputBuilder} object. - */ DigitalOutputBuilder shutdown(DigitalState state); - /** - *

    initial.

    - * - * @param state a {@link com.pi4j.io.gpio.digital.DigitalState} object. - * @return a {@link com.pi4j.io.gpio.digital.DigitalOutputBuilder} object. - */ DigitalOutputBuilder initial(DigitalState state); - /** - *

    provider.

    - * - * @param providerId a {@link java.lang.String} object. - * @return a {@link com.pi4j.io.gpio.digital.DigitalOutputBuilder} object. - */ DigitalOutputBuilder provider(String providerId); - /** - *

    provider.

    - * - * @param providerClass a {@link java.lang.Class} object. - * @return a {@link com.pi4j.io.gpio.digital.DigitalOutputBuilder} object. - */ DigitalOutputBuilder provider(Class providerClass); - /** - *

    newInstance.

    - * - * @param context a {@link com.pi4j.context.Context} object. - * @return a {@link com.pi4j.io.gpio.digital.DigitalOutputBuilder} object. - */ static DigitalOutputBuilder newInstance(Context context) { return DefaultDigitalOutputBuilder.newInstance(context); } - /** - *

    build.

    - * - * @return a {@link com.pi4j.io.gpio.digital.DigitalOutput} object. - */ DigitalOutput build(); } diff --git a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalOutputConfig.java b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalOutputConfig.java index edc57c3d..6b492779 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalOutputConfig.java +++ b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalOutputConfig.java @@ -29,9 +29,6 @@ /** *

    DigitalOutputConfig interface.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface DigitalOutputConfig extends DigitalConfig { /** Constant SHUTDOWN_STATE_KEY="shutdown" */ @@ -39,56 +36,21 @@ public interface DigitalOutputConfig extends DigitalConfig /** Constant INITIAL_STATE_KEY="initial" */ String INITIAL_STATE_KEY = "initial"; - /** - *

    shutdownState.

    - * - * @return a {@link com.pi4j.io.gpio.digital.DigitalState} object. - */ DigitalState shutdownState(); - /** - *

    shutdownState.

    - * - * @param state a {@link com.pi4j.io.gpio.digital.DigitalState} object. - * @return a {@link com.pi4j.io.gpio.digital.DigitalOutputConfig} object. - */ DigitalOutputConfig shutdownState(DigitalState state); - /** - *

    getShutdownState.

    - * - * @return a {@link com.pi4j.io.gpio.digital.DigitalState} object. - */ default DigitalState getShutdownState(){ return shutdownState(); } - /** - *

    setShutdownState.

    - * - * @param state a {@link com.pi4j.io.gpio.digital.DigitalState} object. - */ default void setShutdownState(DigitalState state){ this.shutdownState(state); } - /** - *

    initialState.

    - * - * @return a {@link com.pi4j.io.gpio.digital.DigitalState} object. - */ DigitalState initialState(); - /** - *

    getInitialState.

    - * - * @return a {@link com.pi4j.io.gpio.digital.DigitalState} object. - */ default DigitalState getInitialState(){ return initialState(); } /** - *

    newBuilder.

    - * - * @param context {@link Context} - * @return a {@link com.pi4j.io.gpio.digital.DigitalOutputConfigBuilder} object. * @deprecated As of version 5, please use {@link #newBuilder()} instead. */ @Deprecated diff --git a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalOutputConfigBuilder.java b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalOutputConfigBuilder.java index 19905d28..1f9a8f16 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalOutputConfigBuilder.java +++ b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalOutputConfigBuilder.java @@ -30,36 +30,15 @@ /** *

    DigitalOutputConfigBuilder interface.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface DigitalOutputConfigBuilder extends DigitalConfigBuilder { DigitalOutputConfigBuilder bcm(Integer bcm); - /** - *

    shutdown.

    - * - * @param state a {@link com.pi4j.io.gpio.digital.DigitalState} object. - * @return a {@link com.pi4j.io.gpio.digital.DigitalOutputConfigBuilder} object. - */ DigitalOutputConfigBuilder shutdown(DigitalState state); - /** - *

    initial.

    - * - * @param state a {@link com.pi4j.io.gpio.digital.DigitalState} object. - * @return a {@link com.pi4j.io.gpio.digital.DigitalOutputConfigBuilder} object. - */ DigitalOutputConfigBuilder initial(DigitalState state); - /** - *

    newInstance.

    - * - * @param context {@link Context} - * @return a {@link com.pi4j.io.gpio.digital.DigitalOutputConfigBuilder} object. - */ @Deprecated static DigitalOutputConfigBuilder newInstance(Context context) { return DefaultDigitalOutputConfigBuilder.newInstance(context); diff --git a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalOutputProvider.java b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalOutputProvider.java index 47de12aa..c47a07c8 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalOutputProvider.java +++ b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalOutputProvider.java @@ -27,30 +27,13 @@ /** *

    DigitalOutputProvider interface.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface DigitalOutputProvider extends DigitalProvider { - /** - *

    create.

    - * - * @param builder a {@link com.pi4j.io.gpio.digital.DigitalOutputConfigBuilder} object. - * @param a T object. - * @return a T object. - */ default T create(DigitalOutputConfigBuilder builder) { return (T) create(builder.build()); } - /** - *

    create.

    - * - * @param bcm a {@link java.lang.Integer} object. - * @param a T object. - * @return a T object. - */ default T create(Integer bcm) { var config = DigitalOutput.newConfigBuilder() .bcm(bcm) @@ -58,14 +41,6 @@ default T create(Integer bcm) { return (T) create(config); } - /** - *

    create.

    - * - * @param bcm a {@link java.lang.Integer} object. - * @param id a {@link java.lang.String} object. - * @param a T object. - * @return a T object. - */ default T create(Integer bcm, String id) { var config = DigitalOutput.newConfigBuilder() .id(id) @@ -74,15 +49,6 @@ default T create(Integer bcm, String id) { return (T) create(config); } - /** - *

    create.

    - * - * @param bcm a {@link java.lang.Integer} object. - * @param id a {@link java.lang.String} object. - * @param name a {@link java.lang.String} object. - * @param a T object. - * @return a T object. - */ default T create(Integer bcm, String id, String name) { var config = DigitalOutput.newConfigBuilder() .bcm(bcm) @@ -92,16 +58,6 @@ default T create(Integer bcm, String id, String name) return (T) create(config); } - /** - *

    create.

    - * - * @param bcm a {@link java.lang.Integer} object. - * @param id a {@link java.lang.String} object. - * @param name a {@link java.lang.String} object. - * @param description a {@link java.lang.String} object. - * @param a T object. - * @return a T object. - */ default T create(Integer bcm, String id, String name, String description) { var config = DigitalOutput.newConfigBuilder() .bcm(bcm) diff --git a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalOutputProviderBase.java b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalOutputProviderBase.java index 50d458dd..8822e4f4 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalOutputProviderBase.java +++ b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalOutputProviderBase.java @@ -27,36 +27,19 @@ /** *

    Abstract DigitalOutputProviderBase class.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public abstract class DigitalOutputProviderBase extends DigitalProviderBase implements DigitalOutputProvider { - /** - *

    Constructor for DigitalOutputProviderBase.

    - */ public DigitalOutputProviderBase(){ super(); } - /** - *

    Constructor for DigitalOutputProviderBase.

    - * - * @param id a {@link java.lang.String} object. - */ public DigitalOutputProviderBase(String id){ super(id); } - /** - *

    Constructor for DigitalOutputProviderBase.

    - * - * @param id a {@link java.lang.String} object. - * @param name a {@link java.lang.String} object. - */ public DigitalOutputProviderBase(String id, String name){ super(id, name); } diff --git a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalProvider.java b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalProvider.java index 68354ae8..f8e0e8df 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalProvider.java +++ b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalProvider.java @@ -30,8 +30,6 @@ /** *

    DigitalProvider interface.

    * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id * @param * @param * @param diff --git a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalProviderBase.java b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalProviderBase.java index 487efc9c..93da1201 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalProviderBase.java +++ b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalProviderBase.java @@ -29,8 +29,6 @@ /** *

    Abstract DigitalProviderBase class.

    * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id * @param * @param * @param @@ -42,28 +40,14 @@ public abstract class DigitalProviderBase< extends GpioProviderBase implements DigitalProvider { - /** - *

    Constructor for DigitalProviderBase.

    - */ public DigitalProviderBase(){ super(); } - /** - *

    Constructor for DigitalProviderBase.

    - * - * @param id a {@link java.lang.String} object. - */ public DigitalProviderBase(String id){ super(id); } - /** - *

    Constructor for DigitalProviderBase.

    - * - * @param id a {@link java.lang.String} object. - * @param name a {@link java.lang.String} object. - */ public DigitalProviderBase(String id, String name){ super(id, name); } diff --git a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalState.java b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalState.java index b098ea39..7f581d31 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalState.java +++ b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalState.java @@ -29,10 +29,6 @@ /** * Digital State Enumerations - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public enum DigitalState { @@ -48,37 +44,20 @@ private DigitalState(Integer value, String name) { this.name = name; } - /** - *

    isHigh.

    - * - * @return a boolean. - */ public boolean isHigh() { return (this == HIGH); } - /** - *

    isLow.

    - * - * @return a boolean. - */ public boolean isLow() { return (this == LOW); } - /** - *

    value.

    - * - * @return a {@link java.lang.Number} object. - */ public Number value() { return getValue(); } /** *

    Getter for the field value.

    - * - * @return a {@link java.lang.Number} object. */ public Number getValue() { return value; @@ -86,118 +65,49 @@ public Number getValue() { /** *

    Getter for the field name.

    - * - * @return a {@link java.lang.String} object. */ public String getName() { return name; } - /** - *

    equals.

    - * - * @param state a {@link com.pi4j.io.gpio.digital.DigitalState} object. - * @return a boolean. - */ public boolean equals(DigitalState state) { return this == state; } - /** - *

    equals.

    - * - * @param state a {@link java.lang.Number} object. - * @return a boolean. - */ public boolean equals(Number state) { return this == DigitalState.getState(state); } - /** - *

    equals.

    - * - * @param state a boolean. - * @return a boolean. - */ public boolean equals(boolean state) { return this == DigitalState.getState(state); } - /** - *

    equals.

    - * - * @param state a byte. - * @return a boolean. - */ public boolean equals(byte state){ return equals(DigitalState.getState(state)); } - /** - *

    equals.

    - * - * @param state a short. - * @return a boolean. - */ public boolean equals(short state){ return equals(DigitalState.getState(state)); } - /** - *

    equals.

    - * - * @param state a int. - * @return a boolean. - */ public boolean equals(int state){ return equals(DigitalState.getState(state)); } - /** - *

    equals.

    - * - * @param state a long. - * @return a boolean. - */ public boolean equals(long state){ return equals(DigitalState.getState(state)); } - /** - *

    equals.

    - * - * @param state a float. - * @return a boolean. - */ public boolean equals(float state){ return equals(DigitalState.getState(state)); } - /** - *

    equals.

    - * - * @param state a double. - * @return a boolean. - */ public boolean equals(double state){ return equals(DigitalState.getState(state)); } - /** {@inheritDoc} */ @Override public String toString() { return name; } - /** - *

    state.

    - * - * @param state a {@link java.lang.Number} object. - * @return a {@link com.pi4j.io.gpio.digital.DigitalState} object. - */ public static DigitalState state(Number state) { return getState(state); } - /** - *

    getState.

    - * - * @param state a {@link java.lang.Number} object. - * @return a {@link com.pi4j.io.gpio.digital.DigitalState} object. - */ public static DigitalState getState(Number state) { for (var item : DigitalState.values()) { if (item.getValue().intValue() == state.intValue()) { @@ -207,60 +117,29 @@ public static DigitalState getState(Number state) { return null; } - /** - *

    inverseState.

    - * - * @param state a {@link com.pi4j.io.gpio.digital.DigitalState} object. - * @return a {@link com.pi4j.io.gpio.digital.DigitalState} object. - */ public static DigitalState inverseState(DigitalState state) { return getInverseState(state); } - /** - *

    getInverseState.

    - * - * @param state a {@link com.pi4j.io.gpio.digital.DigitalState} object. - * @return a {@link com.pi4j.io.gpio.digital.DigitalState} object. - */ public static DigitalState getInverseState(DigitalState state) { return (state == HIGH ? LOW : HIGH); } - /** - *

    getState.

    - * - * @param state a boolean. - * @return a {@link com.pi4j.io.gpio.digital.DigitalState} object. - */ public static DigitalState getState(boolean state) { return (state ? DigitalState.HIGH : DigitalState.LOW); } /** - *

    allStates.

    - * * @return an array of {@link com.pi4j.io.gpio.digital.DigitalState} objects. */ public static DigitalState[] allStates() { return DigitalState.values(); } - /** - *

    all.

    - * - * @return a {@link java.util.EnumSet} object. - */ public static EnumSet all() { return EnumSet.of(DigitalState.HIGH, DigitalState.LOW); } - /** - *

    parse.

    - * - * @param state a {@link java.lang.String} object. - * @return a {@link com.pi4j.io.gpio.digital.DigitalState} object. - */ public static DigitalState parse(String state) { if(state.equalsIgnoreCase("0")) return DigitalState.LOW; if(state.equalsIgnoreCase("1")) return DigitalState.HIGH; diff --git a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalStateChangeEvent.java b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalStateChangeEvent.java index be2f8c8d..b169507f 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalStateChangeEvent.java +++ b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalStateChangeEvent.java @@ -28,10 +28,6 @@ /** - *

    DigitalChangeEvent class.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id * @param */ public class DigitalStateChangeEvent implements DigitalEvent { @@ -45,7 +41,6 @@ public class DigitalStateChangeEvent implements Di * Default constructor * * @param state the value changed for this event instance - * @param source a DIGITAL_TYPE object. */ public DigitalStateChangeEvent(DIGITAL_TYPE source, DigitalState state){ this.state = state; // cache a copy of the event instance state @@ -54,21 +49,17 @@ public DigitalStateChangeEvent(DIGITAL_TYPE source, DigitalState state){ /** * The value change for this event instance - * - * @return a {@link com.pi4j.io.gpio.digital.DigitalState} object. */ public DigitalState state() { return this.state; } - /** {@inheritDoc} */ @Override public DIGITAL_TYPE source() { return this.source; } - /** {@inheritDoc} */ @Override public String toString(){ StringBuilder result = new StringBuilder(); diff --git a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalStateChangeListener.java b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalStateChangeListener.java index 00bcfddc..239317fd 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalStateChangeListener.java +++ b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/DigitalStateChangeListener.java @@ -28,9 +28,6 @@ /** *

    DigitalChangeListener interface.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface DigitalStateChangeListener extends DigitalListener { void onDigitalStateChange(DigitalStateChangeEvent event); diff --git a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/PullResistance.java b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/PullResistance.java index d1960537..3d3a0cb5 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/PullResistance.java +++ b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/PullResistance.java @@ -29,10 +29,6 @@ /** * Digital Pin Pull Resistance Enumerations - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public enum PullResistance { OFF(0, "off"), @@ -49,8 +45,6 @@ private PullResistance(int value, String name) { /** *

    Getter for the field value.

    - * - * @return a int. */ public int getValue() { return value; @@ -58,34 +52,20 @@ public int getValue() { /** *

    Getter for the field name.

    - * - * @return a {@link java.lang.String} object. */ public String getName() { return name; } - /** {@inheritDoc} */ @Override public String toString() { return name.toUpperCase(); } - /** - *

    all.

    - * - * @return a {@link java.util.EnumSet} object. - */ public static EnumSet all() { return EnumSet.allOf(PullResistance.class); } - /** - *

    parse.

    - * - * @param pull a {@link java.lang.String} object. - * @return a {@link com.pi4j.io.gpio.digital.PullResistance} object. - */ public static PullResistance parse(String pull) { if(pull.equalsIgnoreCase("0")) return PullResistance.OFF; if(pull.equalsIgnoreCase("1")) return PullResistance.PULL_DOWN; diff --git a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/impl/DefaultDigitalInputConfig.java b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/impl/DefaultDigitalInputConfig.java index 094f8cc3..73d4f0e7 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/impl/DefaultDigitalInputConfig.java +++ b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/impl/DefaultDigitalInputConfig.java @@ -34,12 +34,6 @@ import java.util.Map; -/** - *

    DefaultDigitalInputConfig class.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id - */ public class DefaultDigitalInputConfig extends IOBcmConfigBase implements DigitalInputConfig { @@ -59,8 +53,6 @@ private DefaultDigitalInputConfig() { /** * PRIVATE CONSTRUCTOR - * - * @param properties a {@link java.util.Map} object. */ protected DefaultDigitalInputConfig(Map properties) { super(properties); @@ -101,41 +93,26 @@ public Integer address() { return this.bcm; } - /** - * {@inheritDoc} - */ @Override public Integer bus() { return this.bus; } - /** - * {@inheritDoc} - */ @Override public Integer bcm() { return this.bcm; } - /** - * {@inheritDoc} - */ @Override public int getUniqueIdentifier() { return bcm(); } - /** - * {@inheritDoc} - */ @Override public PullResistance pull() { return this.pullResistance; } - /** - * {@inheritDoc} - */ @Override public Long debounce() { return this.debounce; diff --git a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/impl/DefaultDigitalInputConfigBuilder.java b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/impl/DefaultDigitalInputConfigBuilder.java index 270eebf5..7f0056b0 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/impl/DefaultDigitalInputConfigBuilder.java +++ b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/impl/DefaultDigitalInputConfigBuilder.java @@ -33,12 +33,6 @@ import java.util.concurrent.TimeUnit; -/** - *

    DefaultDigitalInputConfigBuilder class.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id - */ public class DefaultDigitalInputConfigBuilder extends DigitalConfigBuilderBase implements DigitalInputConfigBuilder { @@ -51,27 +45,16 @@ protected DefaultDigitalInputConfigBuilder() { } /** - *

    newInstance.

    - * * @param context - * @return a {@link com.pi4j.io.gpio.digital.DigitalInputConfigBuilder} object. */ public static DigitalInputConfigBuilder newInstance(Context context) { return newInstance(); } - /** - *

    newInstance.

    - * - * @return a {@link com.pi4j.io.gpio.digital.DigitalInputConfigBuilder} object. - */ public static DigitalInputConfigBuilder newInstance() { return new DefaultDigitalInputConfigBuilder(); } - /** - * {@inheritDoc} - */ @Override public DigitalInputConfig build() { DigitalInputConfig config = new DefaultDigitalInputConfig(getResolvedProperties()); @@ -90,27 +73,18 @@ public DigitalInputConfigBuilder address(Integer address) { return this; } - /** - * {@inheritDoc} - */ @Override public DigitalInputConfigBuilder bus(int bus) { this.properties.put(GpioConfig.BUS_KEY, String.valueOf(bus)); return this; } - /** - * {@inheritDoc} - */ @Override public DigitalInputConfigBuilder pull(PullResistance value) { this.properties.put(DigitalInputConfig.PULL_RESISTANCE_KEY, value.toString()); return this; } - /** - * {@inheritDoc} - */ @Override public DigitalInputConfigBuilder debounce(Long microseconds) { if (microseconds != null) { @@ -119,9 +93,6 @@ public DigitalInputConfigBuilder debounce(Long microseconds) { return this; } - /** - * {@inheritDoc} - */ @Override public DigitalInputConfigBuilder debounce(Long interval, TimeUnit units) { return debounce(units.toMicros(interval)); diff --git a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/impl/DefaultDigitalOutputBuilder.java b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/impl/DefaultDigitalOutputBuilder.java index b4b72e89..a4777dde 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/impl/DefaultDigitalOutputBuilder.java +++ b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/impl/DefaultDigitalOutputBuilder.java @@ -31,12 +31,6 @@ import com.pi4j.util.StringUtil; -/** - *

    DefaultDigitalOutputBuilder class.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id - */ public class DefaultDigitalOutputBuilder implements DigitalOutputBuilder { private final Context context; @@ -57,8 +51,6 @@ public static DigitalOutputBuilder newInstance(Context context) { /** * PRIVATE CONSTRUCTOR - * - * @param context a {@link com.pi4j.context.Context} object. */ protected DefaultDigitalOutputBuilder(Context context) { super(); @@ -66,81 +58,54 @@ protected DefaultDigitalOutputBuilder(Context context) { this.builder = DigitalOutputConfigBuilder.newInstance(); } - /** - * {@inheritDoc} - */ @Override public DigitalOutputBuilder id(String id) { this.builder.id(id); return this; } - /** - * {@inheritDoc} - */ @Override public DigitalOutputBuilder name(String name) { this.builder.name(name); return this; } - /** - * {@inheritDoc} - */ @Override public DigitalOutputBuilder description(String description) { this.builder.description(description); return this; } - /** - * {@inheritDoc} - */ @Override public DigitalOutputBuilder address(Integer bcm) { this.builder.bcm(bcm); return this; } - /** - * {@inheritDoc} - */ @Override public DigitalOutputBuilder shutdown(DigitalState state) { this.builder.shutdown(state); return this; } - /** - * {@inheritDoc} - */ @Override public DigitalOutputBuilder initial(DigitalState state) { this.builder.initial(state); return this; } - /** - * {@inheritDoc} - */ @Override public DigitalOutputBuilder provider(String providerId) { this.providerId = providerId; return this; } - /** - * {@inheritDoc} - */ @Override public DigitalOutputBuilder provider(Class providerClass) { this.providerClass = providerClass; return this; } - /** - * {@inheritDoc} - */ @Override public DigitalOutput build() { diff --git a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/impl/DefaultDigitalOutputConfig.java b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/impl/DefaultDigitalOutputConfig.java index df86dfd9..044d2dbc 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/impl/DefaultDigitalOutputConfig.java +++ b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/impl/DefaultDigitalOutputConfig.java @@ -32,12 +32,6 @@ import java.util.Map; -/** - *

    DefaultDigitalOutputConfig class.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id - */ public class DefaultDigitalOutputConfig extends IOBcmConfigBase implements DigitalOutputConfig { @@ -57,8 +51,6 @@ private DefaultDigitalOutputConfig() { /** * PRIVATE CONSTRUCTOR - * - * @param properties a {@link java.util.Map} object. */ protected DefaultDigitalOutputConfig(Map properties) { super(properties); @@ -102,50 +94,32 @@ public Integer address() { return this.bcm; } - /** - * {@inheritDoc} - */ @Override public Integer bus() { return this.bus; } - /** - * {@inheritDoc} - */ @Override public Integer bcm() { return this.bcm; } - /** - * {@inheritDoc} - */ @Override public int getUniqueIdentifier() { return bcm(); } - /** - * {@inheritDoc} - */ @Override public DigitalState shutdownState() { return this.shutdownState; } - /** - * {@inheritDoc} - */ @Override public DefaultDigitalOutputConfig shutdownState(DigitalState state) { this.shutdownState = state; return this; } - /** - * {@inheritDoc} - */ @Override public DigitalState initialState() { return this.initialState; diff --git a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/impl/DefaultDigitalOutputConfigBuilder.java b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/impl/DefaultDigitalOutputConfigBuilder.java index 10f6aaf3..6b8e3cf7 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/impl/DefaultDigitalOutputConfigBuilder.java +++ b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/impl/DefaultDigitalOutputConfigBuilder.java @@ -31,12 +31,6 @@ import com.pi4j.io.gpio.digital.DigitalOutputConfigBuilder; import com.pi4j.io.gpio.digital.DigitalState; -/** - *

    DefaultDigitalOutputConfigBuilder class.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id - */ public class DefaultDigitalOutputConfigBuilder extends DigitalConfigBuilderBase implements DigitalOutputConfigBuilder { @@ -48,65 +42,42 @@ protected DefaultDigitalOutputConfigBuilder() { } /** - *

    newInstance.

    - * * @param context - * @return a {@link com.pi4j.io.gpio.digital.DigitalOutputConfigBuilder} object. */ @Deprecated public static DigitalOutputConfigBuilder newInstance(Context context) { return newInstance(); } - /** - *

    newInstance.

    - * - * @return a {@link com.pi4j.io.gpio.digital.DigitalOutputConfigBuilder} object. - */ public static DigitalOutputConfigBuilder newInstance() { return new DefaultDigitalOutputConfigBuilder(); } - /** - * {@inheritDoc} - */ @Override public DigitalOutputConfigBuilder address(Integer address) { this.properties.put(GpioConfig.BCM_KEY, String.valueOf(address)); return this; } - /** - * {@inheritDoc} - */ @Override public DigitalOutputConfigBuilder bus(int bus) { this.properties.put(GpioConfig.BUS_KEY, String.valueOf(bus)); return this; } - /** - * {@inheritDoc} - */ @Override public DigitalOutputConfigBuilder shutdown(DigitalState state) { this.properties.put(DigitalOutputConfig.SHUTDOWN_STATE_KEY, state.toString()); return this; } - /** - * {@inheritDoc} - */ @Override public DigitalOutputConfigBuilder initial(DigitalState state) { this.properties.put(DigitalOutputConfig.INITIAL_STATE_KEY, state.toString()); return this; } - /** - * {@inheritDoc} - */ @Override public DigitalOutputConfig build() { DigitalOutputConfig config = new DefaultDigitalOutputConfig(getResolvedProperties()); diff --git a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/impl/DigitalConfigBuilderBase.java b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/impl/DigitalConfigBuilderBase.java index cd94564c..724a3a77 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/impl/DigitalConfigBuilderBase.java +++ b/pi4j-core/src/main/java/com/pi4j/io/gpio/digital/impl/DigitalConfigBuilderBase.java @@ -35,8 +35,6 @@ * * @param * @param - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public abstract class DigitalConfigBuilderBase extends IOBcmConfigBuilderBase @@ -48,9 +46,6 @@ public abstract class DigitalConfigBuilderBase - * Based on previous contributions from: Daniel Sendula, - * RasPelikan - * @version $Id: $Id */ public interface I2C extends IO, IODataWriter, IODataReader, I2CRegisterDataReaderWriter, SerialCircuitIO, AutoCloseable { - /** - *

    close.

    - */ // Override to remove checked exception declaration @Override void close(); - /** - *

    newConfigBuilder.

    - * - * @param context {@link Context} - * - * @return a {@link com.pi4j.io.i2c.I2CConfigBuilder} object. - */ static I2CConfigBuilder newConfigBuilder(Context context) { return I2CConfigBuilder.newInstance(); } @@ -154,10 +138,6 @@ default int write(byte[] data, int offset, int length) { /** * Get an encapsulated interface for reading and writing to a specific I2C device register - * - * @param address a int. - * - * @return a {@link com.pi4j.io.i2c.I2CRegister} object. */ I2CRegister getRegister(int address); diff --git a/pi4j-core/src/main/java/com/pi4j/io/i2c/I2CBase.java b/pi4j-core/src/main/java/com/pi4j/io/i2c/I2CBase.java index 0e06c2e3..012adb89 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/i2c/I2CBase.java +++ b/pi4j-core/src/main/java/com/pi4j/io/i2c/I2CBase.java @@ -35,8 +35,6 @@ /** *

    Abstract I2CBase class.

    * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id * @param */ public abstract class I2CBase extends IOBase implements I2C { @@ -44,30 +42,17 @@ public abstract class I2CBase extends IOBaseConstructor for I2CBase.

    - * - * @param provider a {@link I2CProvider} object. - * @param config a {@link I2CConfig} object. - * @param i2CBus a {@link I2CBus} object. - */ public I2CBase(I2CProvider provider, I2CConfig config, T i2CBus) { super(provider, config); this.isOpen = true; this.i2CBus = i2CBus; } - /** - * {@inheritDoc} - */ @Override public boolean isOpen() { return this.isOpen; } - /** - * {@inheritDoc} - */ @Override public void close() { if (isOpen) { @@ -92,9 +77,6 @@ public V execute(Callable action) { return this.i2CBus.execute(this, action); } - /** - * {@inheritDoc} - */ @Override public I2C shutdownInternal(Context context) throws ShutdownException { // if this I2C device is still open, then we need to close it since we are shutting down diff --git a/pi4j-core/src/main/java/com/pi4j/io/i2c/I2CConfig.java b/pi4j-core/src/main/java/com/pi4j/io/i2c/I2CConfig.java index c70fad60..834e7ad9 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/i2c/I2CConfig.java +++ b/pi4j-core/src/main/java/com/pi4j/io/i2c/I2CConfig.java @@ -32,9 +32,6 @@ /** *

    I2CConfig interface.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface I2CConfig extends IOConfig, BusConfig, DeviceConfig { @@ -47,10 +44,6 @@ default I2CImplementation getI2CImplementation() { } /** - *

    newBuilder.

    - * - * @param context {@link Context} - * @return a {@link com.pi4j.io.i2c.I2CConfigBuilder} object. * @deprecated As of version 5, please use {@link #newBuilder()} instead. */ static I2CConfigBuilder newBuilder(Context context) { diff --git a/pi4j-core/src/main/java/com/pi4j/io/i2c/I2CConfigBuilder.java b/pi4j-core/src/main/java/com/pi4j/io/i2c/I2CConfigBuilder.java index 4c52e727..08ea299e 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/i2c/I2CConfigBuilder.java +++ b/pi4j-core/src/main/java/com/pi4j/io/i2c/I2CConfigBuilder.java @@ -32,19 +32,10 @@ /** *

    I2CConfigBuilder interface.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface I2CConfigBuilder extends IOConfigBuilder, ConfigBuilder { - /** - *

    newInstance.

    - * - * @param context {@link Context} - * @return a {@link com.pi4j.io.i2c.I2CConfigBuilder} object. - */ @Deprecated static I2CConfigBuilder newInstance(Context context) { return DefaultI2CConfigBuilder.newInstance(context); @@ -54,19 +45,7 @@ static I2CConfigBuilder newInstance() { return DefaultI2CConfigBuilder.newInstance(); } - /** - *

    bus.

    - * - * @param bus a {@link java.lang.Integer} object. - * @return a {@link com.pi4j.io.i2c.I2CConfigBuilder} object. - */ I2CConfigBuilder bus(Integer bus); - /** - *

    device.

    - * - * @param device a {@link java.lang.Integer} object. - * @return a {@link com.pi4j.io.i2c.I2CConfigBuilder} object. - */ I2CConfigBuilder device(Integer device); I2CConfigBuilder i2cImplementation(I2CImplementation i2CImplementation); diff --git a/pi4j-core/src/main/java/com/pi4j/io/i2c/I2CProvider.java b/pi4j-core/src/main/java/com/pi4j/io/i2c/I2CProvider.java index 0d2f5317..e3f45af4 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/i2c/I2CProvider.java +++ b/pi4j-core/src/main/java/com/pi4j/io/i2c/I2CProvider.java @@ -29,31 +29,13 @@ /** *

    I2CProvider interface.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface I2CProvider extends Provider { - /** - *

    create.

    - * - * @param builder a {@link com.pi4j.io.i2c.I2CConfigBuilder} object. - * @param a T object. - * @return a T object. - */ default T create(I2CConfigBuilder builder) { return (T)create(builder.build()); } - /** - *

    create.

    - * - * @param bus a {@link java.lang.Integer} object. - * @param device a {@link java.lang.Integer} object. - * @param a T object. - * @return a T object. - */ default T create(Integer bus, Integer device) { var config = I2C.newConfigBuilder(context()) .bus(bus) @@ -62,15 +44,6 @@ default T create(Integer bus, Integer device) { return (T)create(config); } - /** - *

    create.

    - * - * @param bus a {@link java.lang.Integer} object. - * @param device a {@link java.lang.Integer} object. - * @param id a {@link java.lang.String} object. - * @param a T object. - * @return a T object. - */ default T create(Integer bus, Integer device, String id) { var config = I2C.newConfigBuilder(context()) .bus(bus) @@ -80,16 +53,6 @@ default T create(Integer bus, Integer device, String id) { return (T)create(config); } - /** - *

    create.

    - * - * @param bus a {@link java.lang.Integer} object. - * @param device a {@link java.lang.Integer} object. - * @param id a {@link java.lang.String} object. - * @param name a {@link java.lang.String} object. - * @param a T object. - * @return a T object. - */ default T create(Integer bus, Integer device, String id, String name) { var config = I2C.newConfigBuilder(context()) .bus(bus) @@ -100,17 +63,6 @@ default T create(Integer bus, Integer device, String id, String return (T)create(config); } - /** - *

    create.

    - * - * @param bus a {@link java.lang.Integer} object. - * @param device a {@link java.lang.Integer} object. - * @param id a {@link java.lang.String} object. - * @param name a {@link java.lang.String} object. - * @param description a {@link java.lang.String} object. - * @param a T object. - * @return a T object. - */ default T create(Integer bus, Integer device, String id, String name, String description) { var config = I2C.newConfigBuilder(context()) .bus(bus) diff --git a/pi4j-core/src/main/java/com/pi4j/io/i2c/I2CProviderBase.java b/pi4j-core/src/main/java/com/pi4j/io/i2c/I2CProviderBase.java index 4ee6222e..8b5b2594 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/i2c/I2CProviderBase.java +++ b/pi4j-core/src/main/java/com/pi4j/io/i2c/I2CProviderBase.java @@ -28,36 +28,19 @@ */ /** *

    Abstract I2CProviderBase class.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public abstract class I2CProviderBase extends ProviderBase implements I2CProvider { - /** - *

    Constructor for I2CProviderBase.

    - */ public I2CProviderBase(){ super(); } - /** - *

    Constructor for I2CProviderBase.

    - * - * @param id a {@link java.lang.String} object. - */ public I2CProviderBase(String id){ super(id); } - /** - *

    Constructor for I2CProviderBase.

    - * - * @param id a {@link java.lang.String} object. - * @param name a {@link java.lang.String} object. - */ public I2CProviderBase(String id, String name){ super(id, name); } diff --git a/pi4j-core/src/main/java/com/pi4j/io/i2c/I2CRegister.java b/pi4j-core/src/main/java/com/pi4j/io/i2c/I2CRegister.java index 560d34e1..0d27b642 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/i2c/I2CRegister.java +++ b/pi4j-core/src/main/java/com/pi4j/io/i2c/I2CRegister.java @@ -31,22 +31,12 @@ /** * I2C Device Register. * This abstraction allows data to be read or written to a specific device register on the I2C bus. - * - * @author Robert Savage - * @version $Id: $Id */ public interface I2CRegister extends IODataWriter, IODataReader, I2CRegisterDataReader, I2CRegisterDataWriter { /** - *

    getAddress.

    - * * @return This I2C device register address */ int getAddress(); - /** - *

    address.

    - * - * @return a int. - */ default int address(){ return getAddress(); } diff --git a/pi4j-core/src/main/java/com/pi4j/io/i2c/I2CRegisterDataReader.java b/pi4j-core/src/main/java/com/pi4j/io/i2c/I2CRegisterDataReader.java index 4346dc25..c6692292 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/i2c/I2CRegisterDataReader.java +++ b/pi4j-core/src/main/java/com/pi4j/io/i2c/I2CRegisterDataReader.java @@ -35,13 +35,6 @@ /** * I2C Register Data Writer Interface for Pi4J Data Communications - * - * @author Robert Savage - *

    - * Based on previous contributions from: - * Daniel Sendula, - * RasPelikan - * @version $Id: $Id */ public interface I2CRegisterDataReader { @@ -183,6 +176,7 @@ default int readRegister(byte[] register, byte[] buffer) { * this function will only write the number of * bytes up to the buffers' available space. *

    + * * @param register The I2C device register address to write to. * @param buffer the byte array/buffer the read data will be copied/inserted into * @param offset the offset index in the data buffer to start copying read data @@ -236,6 +230,7 @@ default int readRegister(int register, byte[] buffer) { * this function will only write the number of * bytes up to the buffers' available space. *

    + * * @param register The I2C device register address to write to. * @param buffer the byte buffer the read data will be copied/inserted into * @param offset the offset index in the data buffer to start copying read data @@ -353,6 +348,7 @@ default int readRegister(int register, ByteBuffer buffer, int length) { * begin writing data from the zero position up to the * buffer's limit. *

    + * * @param register The I2C device register address to write to. * @param buffer byte buffer of data where data read from the I2C device * register will be copied (from current position to limit) @@ -514,7 +510,6 @@ default int readRegister(int register, char[] buffer) { * @param charset character set to use for byte decoding * @param buffer the character array the read data will be copied/inserted into * @param length the number of bytes to read - * @param offset a int. * @return If successful, return the number of bytes (not characters) read from the I2C device register; * else on a read error, return a negative error code. */ @@ -570,7 +565,6 @@ default int readRegister(int register, Charset charset, CharBuffer buffer, int o * @param register The I2C device register address to write to. * @param charset character set to use for byte decoding * @param buffer the character array the read data will be copied/inserted into - * @param length a int. * @return If successful, return the number of bytes (not characters) read from the I2C device register; * else on a read error, return a negative error code. */ @@ -624,7 +618,6 @@ default int readRegister(int register, Charset charset, CharBuffer buffer) { * @param buffer the character array the read data will be copied/inserted into * @param offset the offset index in the character buffer to start copying read data * @param length the number of bytes to read - * @param register a int. * @return If successful, return the number of bytes (not characters) read from the I/O device; * else on a read error, return a negative error code. */ @@ -647,7 +640,6 @@ default int readRegister(int register, CharBuffer buffer, int offset, int length * * @param register The I2C device register address to write to. * @param buffer the character array the read data will be copied/inserted into - * @param length a int. * @return If successful, return the number of bytes (not characters) read from the I2C device register; * else on a read error, return a negative error code. */ @@ -890,7 +882,6 @@ default char[] readRegisterCharArray(int register, int numberOfBytes) throws IOR * @param charset character set to use for byte decoding * @param offset the offset index in the raw bytes read to start from * @param numberOfBytes the number of bytes to read (not number of characters) - * @param register a int. * @return a new character buffer (CharBuffer) containing the decoded character data read from the I2C device register. * @throws com.pi4j.io.exception.IOReadException An com.pi4j.io.exception.IOReadException is thrown if a read access error code * is returned from the underlying read() functions. @@ -911,7 +902,6 @@ default CharBuffer readRegisterCharBuffer(int register, Charset charset, int off * * @param charset character set to use for byte decoding * @param numberOfBytes the number of bytes to read (not number of characters) - * @param register a int. * @return a new character buffer (CharBuffer) containing the decoded character data read from the I2C device register. * @throws com.pi4j.io.exception.IOReadException An com.pi4j.io.exception.IOReadException is thrown if a read access error code * is returned from the underlying read() functions. @@ -930,7 +920,6 @@ default CharBuffer readRegisterCharBuffer(int register, Charset charset, int num * * @param offset the offset index in the raw bytes read to start from * @param numberOfBytes the number of bytes to read (not number of characters) - * @param register a int. * @return a new character buffer (CharBuffer) containing the decoded character data read from the I2C device register. * @throws com.pi4j.io.exception.IOReadException An com.pi4j.io.exception.IOReadException is thrown if a read access error code * is returned from the underlying read() functions. @@ -947,7 +936,6 @@ default CharBuffer readRegisterCharBuffer(int register, int offset, int numberOf * to decode the bytes into chars. * * @param numberOfBytes the number of bytes to read (not number of characters) - * @param register a int. * @return a new character buffer (CharBuffer) containing the decoded character data read from the I2C device register. * @throws com.pi4j.io.exception.IOReadException An com.pi4j.io.exception.IOReadException is thrown if a read access error code * is returned from the underlying read() functions. @@ -967,7 +955,6 @@ default CharBuffer readRegisterCharBuffer(int register, int numberOfBytes) throw * @param charset character set to use for byte decoding * @param offset the offset index in the raw bytes read to start from * @param numberOfBytes the number of bytes to read (not number of characters) - * @param register a int. * @return a new character buffer (CharBuffer) containing the decoded character data read from the I2C device register. * @throws com.pi4j.io.exception.IOReadException An com.pi4j.io.exception.IOReadException is thrown if a read access error code * is returned from the underlying read() functions. @@ -987,7 +974,6 @@ default String readRegisterString(int register, Charset charset, int offset, int * * @param charset character set to use for byte decoding * @param numberOfBytes the number of bytes to read (not number of characters) - * @param register a int. * @return a new character buffer (CharBuffer) containing the decoded character data read from the I2C device register. * @throws java.lang.IllegalArgumentException An java.lang.IllegalArgumentException is thrown if one of the * method parameters are invalid. @@ -1004,7 +990,6 @@ default String readRegisterString(int register, Charset charset, int numberOfByt * * @param offset the offset index in the raw bytes read to start from * @param numberOfBytes the number of bytes to read (not number of characters) - * @param register a int. * @return a new character buffer (CharBuffer) containing the decoded character data read from the I2C device register. * @throws java.lang.IllegalArgumentException An java.lang.IllegalArgumentException is thrown if one of the * method parameters are invalid. @@ -1019,7 +1004,6 @@ default String readRegisterString(int register, int offset, int numberOfBytes) { * decode the bytes into chars. * * @param numberOfBytes the number of bytes to read (not number of characters) - * @param register a int. * @return a new character buffer (CharBuffer) containing the decoded character data read from the I2C device register. * @throws com.pi4j.io.exception.IOReadException An com.pi4j.io.exception.IOReadException is thrown if a read access error code * is returned from the underlying read() functions. diff --git a/pi4j-core/src/main/java/com/pi4j/io/i2c/I2CRegisterDataReaderWriter.java b/pi4j-core/src/main/java/com/pi4j/io/i2c/I2CRegisterDataReaderWriter.java index 1946acb4..03e15814 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/i2c/I2CRegisterDataReaderWriter.java +++ b/pi4j-core/src/main/java/com/pi4j/io/i2c/I2CRegisterDataReaderWriter.java @@ -27,13 +27,6 @@ /** * I2C Register Data Writer Interface for Pi4J Data Communications - * - * @author Robert Savage - *

    - * Based on previous contributions from: - * Daniel Sendula, - * RasPelikan - * @version $Id: $Id */ public interface I2CRegisterDataReaderWriter extends I2CRegisterDataReader, I2CRegisterDataWriter { /** diff --git a/pi4j-core/src/main/java/com/pi4j/io/i2c/I2CRegisterDataWriter.java b/pi4j-core/src/main/java/com/pi4j/io/i2c/I2CRegisterDataWriter.java index 8d24d4f7..7375c6d6 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/i2c/I2CRegisterDataWriter.java +++ b/pi4j-core/src/main/java/com/pi4j/io/i2c/I2CRegisterDataWriter.java @@ -36,13 +36,6 @@ /** * I2C Register Data Writer Interface for Pi4J Data Communications - * - * @author Robert Savage - *

    - * Based on previous contributions from: - * Daniel Sendula, - * RasPelikan - * @version $Id: $Id */ public interface I2CRegisterDataWriter { @@ -56,7 +49,6 @@ public interface I2CRegisterDataWriter { * * @param register the register address to write to * @param b byte to be written - * @return a int. */ int writeRegister(int register, byte b); @@ -66,7 +58,6 @@ public interface I2CRegisterDataWriter { * * @param register the register address to write to * @param b byte to be written; the provided Integer wll be cast to a Byte. - * @return a int. */ default int writeRegister(int register, int b) { return writeRegister(register, (byte)b); @@ -81,7 +72,6 @@ default int writeRegister(int register, int b) { * * @param register the register address to write to * @param word 16-bit word value to be written - * @return a int. */ default int writeRegisterWord(int register, int word) { byte[] buffer = new byte[] { (byte)(word >> 8), (byte)word }; @@ -544,7 +534,6 @@ default int writeRegister(int register, Charset charset, char ... data) throws I * @param data collection of character sequences of data to be written * @return The number of bytes written, possibly zero * @throws java.io.IOException thrown on write error - * @param charset a {@link java.nio.charset.Charset} object. */ default int writeRegister(int register, Charset charset, Collection data) throws IOException { ByteArrayOutputStream os = new ByteArrayOutputStream(); diff --git a/pi4j-core/src/main/java/com/pi4j/io/i2c/impl/DefaultI2CConfig.java b/pi4j-core/src/main/java/com/pi4j/io/i2c/impl/DefaultI2CConfig.java index bfe06ee3..0f36b6f9 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/i2c/impl/DefaultI2CConfig.java +++ b/pi4j-core/src/main/java/com/pi4j/io/i2c/impl/DefaultI2CConfig.java @@ -34,12 +34,6 @@ import java.util.Map; -/** - *

    DefaultI2CConfig class.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id - */ public class DefaultI2CConfig extends IOConfigBase implements I2CConfig { @@ -61,8 +55,6 @@ private DefaultI2CConfig() { /** * PRIVATE CONSTRUCTOR - * - * @param properties a {@link java.util.Map} object. */ protected DefaultI2CConfig(Map properties) { super(properties); @@ -94,25 +86,16 @@ protected DefaultI2CConfig(Map properties) { this.description = StringUtil.setIfNullOrEmpty(this.description, "I2C-" + this.bus() + "." + this.device(), true); } - /** - * {@inheritDoc} - */ @Override public Integer bus() { return this.bus; } - /** - * {@inheritDoc} - */ @Override public Integer device() { return this.device; } - /** - * {@inheritDoc} - */ @Override public int getUniqueIdentifier() { return (bus() << 8) + device(); diff --git a/pi4j-core/src/main/java/com/pi4j/io/i2c/impl/DefaultI2CConfigBuilder.java b/pi4j-core/src/main/java/com/pi4j/io/i2c/impl/DefaultI2CConfigBuilder.java index 1bdbf147..2c2d5200 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/i2c/impl/DefaultI2CConfigBuilder.java +++ b/pi4j-core/src/main/java/com/pi4j/io/i2c/impl/DefaultI2CConfigBuilder.java @@ -29,12 +29,6 @@ import com.pi4j.io.i2c.*; import com.pi4j.io.impl.IOConfigBuilderBase; -/** - *

    DefaultI2CConfigBuilder class.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id - */ public class DefaultI2CConfigBuilder extends IOConfigBuilderBase implements I2CConfigBuilder { @@ -46,10 +40,7 @@ protected DefaultI2CConfigBuilder(){ } /** - *

    newInstance.

    - * * @param context - * @return a {@link com.pi4j.io.i2c.I2CConfigBuilder} object. */ @Deprecated public static I2CConfigBuilder newInstance(Context context) { @@ -57,30 +48,22 @@ public static I2CConfigBuilder newInstance(Context context) { } - /** - *

    newInstance.

    - * - * @return a {@link com.pi4j.io.i2c.I2CConfigBuilder} object. - */ public static I2CConfigBuilder newInstance() { return new DefaultI2CConfigBuilder(); } - /** {@inheritDoc} */ @Override public I2CConfig build() { I2CConfig config = new DefaultI2CConfig(getResolvedProperties()); return config; } - /** {@inheritDoc} */ @Override public I2CConfigBuilder bus(Integer bus){ this.properties.put(I2CConfig.BUS_KEY, bus.toString()); return this; } - /** {@inheritDoc} */ @Override public I2CConfigBuilder device(Integer device){ this.properties.put(I2CConfig.DEVICE_KEY, device.toString()); diff --git a/pi4j-core/src/main/java/com/pi4j/io/i2c/impl/DefaultI2CRegister.java b/pi4j-core/src/main/java/com/pi4j/io/i2c/impl/DefaultI2CRegister.java index 66d42f2b..b1339272 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/i2c/impl/DefaultI2CRegister.java +++ b/pi4j-core/src/main/java/com/pi4j/io/i2c/impl/DefaultI2CRegister.java @@ -33,45 +33,30 @@ import java.nio.charset.Charset; import java.util.Objects; -/** - *

    DefaultI2CRegister class.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id - */ public class DefaultI2CRegister implements I2CRegister, I2CRegisterDataReader, I2CRegisterDataWriter { protected final int address; protected final I2C i2c; - /** - *

    Constructor for DefaultI2CRegister.

    - * - * @param i2c a {@link com.pi4j.io.i2c.I2C} object. - * @param address a int. - */ - public DefaultI2CRegister(I2C i2c, int address){ + public DefaultI2CRegister(I2C i2c, int address) { this.i2c = i2c; this.address = address; } - /** {@inheritDoc} */ @Override public int getAddress() { return this.address; } - /** {@inheritDoc} */ @Override public int write(byte b) { return this.i2c.writeRegister(this.address, b); } - /** * {@inheritDoc} - * + *

    * Write a single word value (16-bit) to the I2C device register. */ @Override @@ -79,80 +64,68 @@ public void writeWord(int word) { this.i2c.writeRegisterWord(this.address, word); } - /** {@inheritDoc} */ @Override public int write(byte[] data, int offset, int length) { Objects.checkFromIndexSize(offset, length, data.length); return this.i2c.writeRegister(this.address, data, offset, length); } - /** {@inheritDoc} */ @Override public int readWord() { return this.i2c.readRegisterWord(this.address); } - /** {@inheritDoc} */ @Override public int writeReadWord(int word) { return this.i2c.writeReadRegisterWord(this.address, word); } - /** {@inheritDoc} */ @Override public int read() { return this.i2c.readRegister(this.address); } - /** {@inheritDoc} */ @Override public int read(byte[] buffer, int offset, int length) { Objects.checkFromIndexSize(offset, length, buffer.length); return this.i2c.readRegister(this.address, buffer, offset, length); } - /** {@inheritDoc} */ @Override public String readString(Charset charset, int length) { return this.i2c.readRegisterString(this.address, charset, length); } - /** {@inheritDoc} */ @Override public int readRegister(int register) { return this.i2c.readRegister(register); } - /** {@inheritDoc} */ @Override public int readRegister(byte[] register, byte[] buffer, int offset, int length) { - return this.i2c.readRegister(register,buffer,offset,length); + return this.i2c.readRegister(register, buffer, offset, length); } - /** {@inheritDoc} */ @Override public int readRegister(int register, byte[] buffer, int offset, int length) { - return this.i2c.readRegister(register,buffer,offset,length); + return this.i2c.readRegister(register, buffer, offset, length); } - /** {@inheritDoc} */ @Override public int writeRegister(int register, byte b) { return this.i2c.writeRegister(register, b); } - /** {@inheritDoc} */ @Override public int writeRegister(int register, byte[] data, int offset, int length) { - return this.i2c.writeRegister(register,data,offset,length); + return this.i2c.writeRegister(register, data, offset, length); } - /** {@inheritDoc} */ @Override public int writeRegister(byte[] register, byte[] data, int offset, int length) { - return this.i2c.writeRegister(register,data,offset,length); + return this.i2c.writeRegister(register, data, offset, length); } } diff --git a/pi4j-core/src/main/java/com/pi4j/io/impl/IOBcmConfigBase.java b/pi4j-core/src/main/java/com/pi4j/io/impl/IOBcmConfigBase.java index b2725276..2b178cca 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/impl/IOBcmConfigBase.java +++ b/pi4j-core/src/main/java/com/pi4j/io/impl/IOBcmConfigBase.java @@ -33,11 +33,7 @@ import java.util.Map; /** - *

    ConfigBase class.

    - * * @param - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public class IOBcmConfigBase extends BcmConfigBase @@ -55,8 +51,6 @@ protected IOBcmConfigBase() { /** * PRIVATE CONSTRUCTOR - * - * @param properties a {@link Map} object. */ protected IOBcmConfigBase(Map properties) { super(properties); @@ -72,17 +66,11 @@ protected IOBcmConfigBase(Map properties) { } } - /** - * {@inheritDoc} - */ @Override public String platform() { return this.platform; } - /** - * {@inheritDoc} - */ @Override public String provider() { return this.provider; diff --git a/pi4j-core/src/main/java/com/pi4j/io/impl/IOBcmConfigBuilderBase.java b/pi4j-core/src/main/java/com/pi4j/io/impl/IOBcmConfigBuilderBase.java index 95e76c1a..e53037a3 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/impl/IOBcmConfigBuilderBase.java +++ b/pi4j-core/src/main/java/com/pi4j/io/impl/IOBcmConfigBuilderBase.java @@ -38,8 +38,6 @@ * * @param * @param - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public abstract class IOBcmConfigBuilderBase extends BcmConfigBuilderBase @@ -52,18 +50,12 @@ public abstract class IOBcmConfigBuilderBase providerClass) { this.properties.put(IOConfig.PROVIDER_KEY, providerClass.getName()); diff --git a/pi4j-core/src/main/java/com/pi4j/io/impl/IOConfigBase.java b/pi4j-core/src/main/java/com/pi4j/io/impl/IOConfigBase.java index 72d2e4db..a5ad3f97 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/impl/IOConfigBase.java +++ b/pi4j-core/src/main/java/com/pi4j/io/impl/IOConfigBase.java @@ -32,10 +32,6 @@ import java.util.Map; /** - *

    ConfigBase class.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id * @param */ public abstract class IOConfigBase extends ConfigBase implements IOConfig { @@ -52,8 +48,6 @@ protected IOConfigBase(){ /** * PRIVATE CONSTRUCTOR - * - * @param properties a {@link Map} object. */ protected IOConfigBase(Map properties){ super(properties); @@ -68,13 +62,11 @@ protected IOConfigBase(Map properties){ } } - /** {@inheritDoc} */ @Override public String platform() { return this.platform; } - /** {@inheritDoc} */ @Override public String provider() { return this.provider; diff --git a/pi4j-core/src/main/java/com/pi4j/io/impl/IOConfigBuilderBase.java b/pi4j-core/src/main/java/com/pi4j/io/impl/IOConfigBuilderBase.java index d57ed661..5f09e541 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/impl/IOConfigBuilderBase.java +++ b/pi4j-core/src/main/java/com/pi4j/io/impl/IOConfigBuilderBase.java @@ -35,8 +35,6 @@ /** *

    Abstract AddressConfigBuilderBase class.

    * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id * @param * @param */ @@ -50,14 +48,12 @@ public abstract class IOConfigBuilderBase providerClass){ this.properties.put(IOConfig.PROVIDER_KEY, providerClass.getName()); diff --git a/pi4j-core/src/main/java/com/pi4j/io/impl/IODeviceConfigBase.java b/pi4j-core/src/main/java/com/pi4j/io/impl/IODeviceConfigBase.java index e801cc9f..d8fcbf2a 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/impl/IODeviceConfigBase.java +++ b/pi4j-core/src/main/java/com/pi4j/io/impl/IODeviceConfigBase.java @@ -33,11 +33,7 @@ import java.util.Map; /** - *

    ConfigBase class.

    - * * @param - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public class IODeviceConfigBase> extends DeviceConfigBase @@ -55,8 +51,6 @@ protected IODeviceConfigBase() { /** * PRIVATE CONSTRUCTOR - * - * @param properties a {@link Map} object. */ protected IODeviceConfigBase(Map properties) { super(properties); @@ -71,17 +65,11 @@ protected IODeviceConfigBase(Map properties) { } } - /** - * {@inheritDoc} - */ @Override public String platform() { return this.platform; } - /** - * {@inheritDoc} - */ @Override public String provider() { return this.provider; diff --git a/pi4j-core/src/main/java/com/pi4j/io/impl/IODeviceConfigBuilderBase.java b/pi4j-core/src/main/java/com/pi4j/io/impl/IODeviceConfigBuilderBase.java index 3a8959fe..82bacebd 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/impl/IODeviceConfigBuilderBase.java +++ b/pi4j-core/src/main/java/com/pi4j/io/impl/IODeviceConfigBuilderBase.java @@ -36,8 +36,6 @@ /** *

    Abstract AddressConfigBuilderBase class.

    * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id * @param * @param */ @@ -52,14 +50,12 @@ public abstract class IODeviceConfigBuilderBase providerClass){ this.properties.put(IOConfig.PROVIDER_KEY, providerClass.getName()); diff --git a/pi4j-core/src/main/java/com/pi4j/io/impl/IOPortConfigBase.java b/pi4j-core/src/main/java/com/pi4j/io/impl/IOPortConfigBase.java index 92d3f96d..28df97d2 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/impl/IOPortConfigBase.java +++ b/pi4j-core/src/main/java/com/pi4j/io/impl/IOPortConfigBase.java @@ -33,11 +33,7 @@ import java.util.Map; /** - *

    ConfigBase class.

    - * * @param - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public class IOPortConfigBase extends PortConfigBase @@ -55,8 +51,6 @@ protected IOPortConfigBase() { /** * PRIVATE CONSTRUCTOR - * - * @param properties a {@link Map} object. */ protected IOPortConfigBase(Map properties) { super(properties); @@ -72,17 +66,11 @@ protected IOPortConfigBase(Map properties) { } } - /** - * {@inheritDoc} - */ @Override public String platform() { return this.platform; } - /** - * {@inheritDoc} - */ @Override public String provider() { return this.provider; diff --git a/pi4j-core/src/main/java/com/pi4j/io/impl/IOPortConfigBuilderBase.java b/pi4j-core/src/main/java/com/pi4j/io/impl/IOPortConfigBuilderBase.java index 0a336e2c..b3058ffb 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/impl/IOPortConfigBuilderBase.java +++ b/pi4j-core/src/main/java/com/pi4j/io/impl/IOPortConfigBuilderBase.java @@ -39,8 +39,6 @@ * * @param * @param - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public abstract class IOPortConfigBuilderBase extends PortConfigBuilderBase @@ -54,18 +52,12 @@ protected IOPortConfigBuilderBase(Context context) { super(context); } - /** - * {@inheritDoc} - */ @Override public BUILDER_TYPE provider(String provider) { this.properties.put(IOConfig.PROVIDER_KEY, provider); return (BUILDER_TYPE) this; } - /** - * {@inheritDoc} - */ @Override public BUILDER_TYPE provider(Class providerClass) { this.properties.put(IOConfig.PROVIDER_KEY, providerClass.getName()); diff --git a/pi4j-core/src/main/java/com/pi4j/io/pwm/Pwm.java b/pi4j-core/src/main/java/com/pi4j/io/pwm/Pwm.java index 6eaadb1b..03fff818 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/pwm/Pwm.java +++ b/pi4j-core/src/main/java/com/pi4j/io/pwm/Pwm.java @@ -35,9 +35,6 @@ /** *

    Pwm interface.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface Pwm extends IO, OnOff { @@ -45,12 +42,6 @@ public interface Pwm extends IO, OnOff { static final long KILOHERTZ = Frequency.KILOHERTZ; static final long HERTZ = Frequency.HERTZ; - /** - *

    newConfigBuilder.

    - * - * @param context {@link Context} - * @return a {@link com.pi4j.io.pwm.PwmConfigBuilder} object. - */ static PwmConfigBuilder newConfigBuilder(Context context) { return PwmConfigBuilder.newInstance(context); } @@ -112,7 +103,6 @@ default boolean isOff() { /** * Turn the PWM signal [OFF] by applying a zero frequency and zero duty-cycle to the PWM pin. * - * @return a {@link com.pi4j.io.pwm.Pwm} object. * @throws IOException if fails to communicate with the PWM pin */ @Override diff --git a/pi4j-core/src/main/java/com/pi4j/io/pwm/PwmBase.java b/pi4j-core/src/main/java/com/pi4j/io/pwm/PwmBase.java index 44684388..c64a183b 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/pwm/PwmBase.java +++ b/pi4j-core/src/main/java/com/pi4j/io/pwm/PwmBase.java @@ -38,9 +38,6 @@ /** *

    Abstract PwmBase class.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public abstract class PwmBase extends IOBase implements Pwm { @@ -51,12 +48,6 @@ public abstract class PwmBase extends IOBase implem protected PwmPolarity polarity = PwmPolarity.NORMAL; protected Map presets = Collections.synchronizedMap(new HashMap<>()); - /** - *

    Constructor for PwmBase.

    - * - * @param provider a {@link com.pi4j.io.pwm.PwmProvider} object. - * @param config a {@link com.pi4j.io.pwm.PwmConfig} object. - */ public PwmBase(PwmProvider provider, PwmConfig config) { super(provider, config); for (PwmPreset preset : config.presets()) { @@ -64,33 +55,21 @@ public PwmBase(PwmProvider provider, PwmConfig config) { } } - /** - * {@inheritDoc} - */ @Override public double getDutyCycle() throws IOException { return this.dutyCycle; } - /** - * {@inheritDoc} - */ @Override public double getFrequency() throws IOException { return this.frequency; } - /** - * {@inheritDoc} - */ @Override public double getActualFrequency() throws IOException { return this.frequency; } - /** - * {@inheritDoc} - */ @Override public void setDutyCycle(double dutyCycle) throws IOException { double dc = dutyCycle; @@ -103,25 +82,16 @@ public void setDutyCycle(double dutyCycle) throws IOException { this.dutyCycle = dc; } - /** - * {@inheritDoc} - */ @Override public void setFrequency(double frequency) throws IOException { this.frequency = frequency; } - /** - * {@inheritDoc} - */ @Override public boolean isOn() { return this.onState; } - /** - * {@inheritDoc} - */ @Override public Pwm initialize(Context context) throws InitializeException { @@ -162,9 +132,6 @@ public Pwm initialize(Context context) throws InitializeException { return this; } - /** - * {@inheritDoc} - */ @Override public Pwm shutdownInternal(Context context) throws ShutdownException { // apply a shutdown value if configured @@ -182,17 +149,11 @@ public Pwm shutdownInternal(Context context) throws ShutdownException { return this; } - /** - * {@inheritDoc} - */ @Override public Map getPresets() { return Collections.unmodifiableMap(this.presets); } - /** - * {@inheritDoc} - */ @Override public PwmPreset getPreset(String name) { String key = name.toLowerCase().trim(); @@ -202,9 +163,6 @@ public PwmPreset getPreset(String name) { return null; } - /** - * {@inheritDoc} - */ @Override public PwmPreset deletePreset(String name) { String key = name.toLowerCase().trim(); @@ -214,9 +172,6 @@ public PwmPreset deletePreset(String name) { return null; } - /** - * {@inheritDoc} - */ @Override public Pwm addPreset(PwmPreset preset) { String key = preset.name().toLowerCase().trim(); @@ -224,9 +179,6 @@ public Pwm addPreset(PwmPreset preset) { return this; } - /** - * {@inheritDoc} - */ @Override public Pwm applyPreset(String name) throws IOException { String key = name.toLowerCase().trim(); diff --git a/pi4j-core/src/main/java/com/pi4j/io/pwm/PwmConfig.java b/pi4j-core/src/main/java/com/pi4j/io/pwm/PwmConfig.java index cfe33f60..ad9de07b 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/pwm/PwmConfig.java +++ b/pi4j-core/src/main/java/com/pi4j/io/pwm/PwmConfig.java @@ -34,9 +34,6 @@ /** *

    PwmConfig interface.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface PwmConfig extends ChipConfig, ChannelConfig, BcmConfig, IOConfig { diff --git a/pi4j-core/src/main/java/com/pi4j/io/pwm/PwmConfigBuilder.java b/pi4j-core/src/main/java/com/pi4j/io/pwm/PwmConfigBuilder.java index fc86a678..ce5fbfd8 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/pwm/PwmConfigBuilder.java +++ b/pi4j-core/src/main/java/com/pi4j/io/pwm/PwmConfigBuilder.java @@ -32,19 +32,10 @@ /** *

    PwmConfigBuilder interface.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface PwmConfigBuilder extends IOConfigBuilder, ConfigBuilder { - /** - *

    newInstance.

    - * - * @param context {@link Context} - * @return a {@link com.pi4j.io.pwm.PwmConfigBuilder} object. - */ static PwmConfigBuilder newInstance(Context context) { return DefaultPwmConfigBuilder.newInstance(); } @@ -123,7 +114,6 @@ default PwmConfigBuilder dutyCycle(Integer dutyCycle) { * PWM generators. Please consult the documentation for your PWM provider * to determine what support is available and what limitations may apply. * - * @param pwmType a {@link com.pi4j.io.pwm.PwmType} object. * @return this builder instance */ PwmConfigBuilder pwmType(PwmType pwmType); @@ -134,7 +124,6 @@ default PwmConfigBuilder dutyCycle(Integer dutyCycle) { * consult the documentation for your PWM provider to determine * what support is available and what limitations may apply. * - * @param polarity a {@link com.pi4j.io.pwm.PwmPolarity} object. * @return this builder instance */ PwmConfigBuilder polarity(PwmPolarity polarity); diff --git a/pi4j-core/src/main/java/com/pi4j/io/pwm/PwmPolarity.java b/pi4j-core/src/main/java/com/pi4j/io/pwm/PwmPolarity.java index b28bedee..8c2195f4 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/pwm/PwmPolarity.java +++ b/pi4j-core/src/main/java/com/pi4j/io/pwm/PwmPolarity.java @@ -29,10 +29,6 @@ /** * PWM Polarity Enumerations - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public enum PwmPolarity { NORMAL(0, "normal"), @@ -48,8 +44,6 @@ private PwmPolarity(int value, String name) { /** *

    Getter for the field value.

    - * - * @return a int. */ public int getValue() { return value; @@ -57,34 +51,20 @@ public int getValue() { /** *

    Getter for the field name.

    - * - * @return a {@link String} object. */ public String getName() { return name; } - /** {@inheritDoc} */ @Override public String toString() { return name.toUpperCase(); } - /** - *

    all.

    - * - * @return a {@link EnumSet} object. - */ public static EnumSet all() { return EnumSet.allOf(PwmPolarity.class); } - /** - *

    parse.

    - * - * @param polarity a {@link String} object. - * @return a {@link PwmPolarity} object. - */ public static PwmPolarity parse(String polarity) { if(polarity.equalsIgnoreCase("0")) return PwmPolarity.NORMAL; if(polarity.equalsIgnoreCase("1")) return PwmPolarity.INVERSED; diff --git a/pi4j-core/src/main/java/com/pi4j/io/pwm/PwmPreset.java b/pi4j-core/src/main/java/com/pi4j/io/pwm/PwmPreset.java index 09f44b7a..b4c1ea23 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/pwm/PwmPreset.java +++ b/pi4j-core/src/main/java/com/pi4j/io/pwm/PwmPreset.java @@ -29,9 +29,6 @@ /** *

    PwmPreset interface.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface PwmPreset { diff --git a/pi4j-core/src/main/java/com/pi4j/io/pwm/PwmPresetBuilder.java b/pi4j-core/src/main/java/com/pi4j/io/pwm/PwmPresetBuilder.java index 7cc3a924..fbb04b6e 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/pwm/PwmPresetBuilder.java +++ b/pi4j-core/src/main/java/com/pi4j/io/pwm/PwmPresetBuilder.java @@ -30,17 +30,8 @@ /** *

    PwmPresetBuilder interface.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface PwmPresetBuilder extends Builder { - /** - *

    newInstance.

    - * - * @param name a {@link java.lang.String} object. - * @return a {@link com.pi4j.io.pwm.PwmPresetBuilder} object. - */ static PwmPresetBuilder newInstance(String name) { return DefaultPwmPresetBuilder.newInstance(name); } diff --git a/pi4j-core/src/main/java/com/pi4j/io/pwm/PwmProvider.java b/pi4j-core/src/main/java/com/pi4j/io/pwm/PwmProvider.java index 224c2dba..b75286cb 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/pwm/PwmProvider.java +++ b/pi4j-core/src/main/java/com/pi4j/io/pwm/PwmProvider.java @@ -29,26 +29,14 @@ /** *

    PwmProvider interface.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface PwmProvider extends Provider { - /** - *

    create.

    - * - * @param builder a {@link com.pi4j.io.pwm.PwmConfigBuilder} object. - * @param a T object. - * @return a T object. - */ default T create(PwmConfigBuilder builder) { return (T) create(builder.build()); } /** - *

    create.

    - * * @param chip * @param channel * @param @@ -62,15 +50,6 @@ default T create(Integer chip, Integer channel) { return (T) create(config); } - /** - *

    create.

    - * - * @param chip a {@link java.lang.Integer} object. - * @param channel a {@link java.lang.Integer} object. - * @param id a {@link java.lang.String} object. - * @param a T object. - * @return a T object. - */ default T create(Integer chip, Integer channel, String id) { var config = Pwm.newConfigBuilder(context()) .chip(chip) @@ -80,16 +59,6 @@ default T create(Integer chip, Integer channel, String id) { return (T) create(config); } - /** - *

    create.

    - * - * @param chip a {@link java.lang.Integer} object. - * @param channel a {@link java.lang.Integer} object. - * @param id a {@link java.lang.String} object. - * @param name a {@link java.lang.String} object. - * @param a T object. - * @return a T object. - */ default T create(Integer chip, Integer channel, String id, String name) { var config = Pwm.newConfigBuilder(context()) .chip(chip) @@ -100,17 +69,6 @@ default T create(Integer chip, Integer channel, String id, Strin return (T) create(config); } - /** - *

    create.

    - * - * @param chip a {@link java.lang.Integer} object. - * @param channel a {@link java.lang.Integer} object. - * @param id a {@link java.lang.String} object. - * @param name a {@link java.lang.String} object. - * @param description a {@link java.lang.String} object. - * @param a T object. - * @return a T object. - */ default T create(Integer chip, Integer channel, String id, String name, String description) { var config = Pwm.newConfigBuilder(context()) .chip(chip) diff --git a/pi4j-core/src/main/java/com/pi4j/io/pwm/PwmProviderBase.java b/pi4j-core/src/main/java/com/pi4j/io/pwm/PwmProviderBase.java index 33c1a4bc..f97b758c 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/pwm/PwmProviderBase.java +++ b/pi4j-core/src/main/java/com/pi4j/io/pwm/PwmProviderBase.java @@ -28,36 +28,19 @@ */ /** *

    Abstract PwmProviderBase class.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public abstract class PwmProviderBase extends ProviderBase implements PwmProvider { - /** - *

    Constructor for PwmProviderBase.

    - */ public PwmProviderBase(){ super(); } - /** - *

    Constructor for PwmProviderBase.

    - * - * @param id a {@link java.lang.String} object. - */ public PwmProviderBase(String id){ super(id); } - /** - *

    Constructor for PwmProviderBase.

    - * - * @param id a {@link java.lang.String} object. - * @param name a {@link java.lang.String} object. - */ public PwmProviderBase(String id, String name){ super(id, name); } diff --git a/pi4j-core/src/main/java/com/pi4j/io/pwm/PwmType.java b/pi4j-core/src/main/java/com/pi4j/io/pwm/PwmType.java index d82f9dcd..1e5b77bf 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/pwm/PwmType.java +++ b/pi4j-core/src/main/java/com/pi4j/io/pwm/PwmType.java @@ -29,10 +29,6 @@ /** * PWM Type Enumerations - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public enum PwmType { SOFTWARE(0, "software"), @@ -48,8 +44,6 @@ private PwmType(int value, String name) { /** *

    Getter for the field value.

    - * - * @return a int. */ public int getValue() { return value; @@ -57,34 +51,20 @@ public int getValue() { /** *

    Getter for the field name.

    - * - * @return a {@link java.lang.String} object. */ public String getName() { return name; } - /** {@inheritDoc} */ @Override public String toString() { return name.toUpperCase(); } - /** - *

    all.

    - * - * @return a {@link java.util.EnumSet} object. - */ public static EnumSet all() { return EnumSet.allOf(PwmType.class); } - /** - *

    parse.

    - * - * @param pwmType a {@link java.lang.String} object. - * @return a {@link com.pi4j.io.pwm.PwmType} object. - */ public static PwmType parse(String pwmType) { if(pwmType.equalsIgnoreCase("0")) return PwmType.SOFTWARE; if(pwmType.equalsIgnoreCase("1")) return PwmType.HARDWARE; diff --git a/pi4j-core/src/main/java/com/pi4j/io/pwm/impl/DefaultPwmConfig.java b/pi4j-core/src/main/java/com/pi4j/io/pwm/impl/DefaultPwmConfig.java index 2615c86b..1f08eca0 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/pwm/impl/DefaultPwmConfig.java +++ b/pi4j-core/src/main/java/com/pi4j/io/pwm/impl/DefaultPwmConfig.java @@ -38,12 +38,6 @@ import java.util.List; import java.util.Map; -/** - *

    DefaultPwmConfig class.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id - */ public class DefaultPwmConfig extends IOConfigBase implements PwmConfig { @@ -73,9 +67,6 @@ private DefaultPwmConfig() { /** * PRIVATE CONSTRUCTOR - * - * @param properties a {@link java.util.Map} object. - * @param presets a {@link java.util.Collection} object. */ protected DefaultPwmConfig(Map properties, Collection presets) { this(properties); @@ -84,8 +75,6 @@ protected DefaultPwmConfig(Map properties, Collection /** * PRIVATE CONSTRUCTOR - * - * @param properties a {@link java.util.Map} object. */ protected DefaultPwmConfig(Map properties) { super(properties); @@ -172,9 +161,6 @@ public Integer bcm() { return this.bcm; } - /** - * {@inheritDoc} - */ @Override public int getUniqueIdentifier() { return (chip == null ? 0 : (chip << 16)) @@ -182,49 +168,31 @@ public int getUniqueIdentifier() { + (bcm == null ? 0 : bcm); } - /** - * {@inheritDoc} - */ @Override public Double dutyCycle() { return this.dutyCycle; } - /** - * {@inheritDoc} - */ @Override public Double frequency() { return this.frequency; } - /** - * {@inheritDoc} - */ @Override public PwmType pwmType() { return this.pwmType; } - /** - * {@inheritDoc} - */ @Override public PwmPolarity polarity() { return this.polarity; } - /** - * {@inheritDoc} - */ @Override public Double shutdownValue() { return this.shutdownValue; } - /** - * {@inheritDoc} - */ @Override public PwmConfig shutdownValue(Double dutyCycle) { @@ -237,17 +205,11 @@ public PwmConfig shutdownValue(Double dutyCycle) { return this; } - /** - * {@inheritDoc} - */ @Override public Double initialValue() { return this.initialValue; } - /** - * {@inheritDoc} - */ @Override public Collection presets() { return this.presets; diff --git a/pi4j-core/src/main/java/com/pi4j/io/pwm/impl/DefaultPwmConfigBuilder.java b/pi4j-core/src/main/java/com/pi4j/io/pwm/impl/DefaultPwmConfigBuilder.java index f77408fb..73148c4b 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/pwm/impl/DefaultPwmConfigBuilder.java +++ b/pi4j-core/src/main/java/com/pi4j/io/pwm/impl/DefaultPwmConfigBuilder.java @@ -32,12 +32,6 @@ import java.util.ArrayList; import java.util.List; -/** - *

    DefaultPwmConfigBuilder class.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id - */ public class DefaultPwmConfigBuilder extends IOBcmConfigBuilderBase implements PwmConfigBuilder { @@ -51,10 +45,7 @@ protected DefaultPwmConfigBuilder() { } /** - *

    newInstance.

    - * * @param context - * @return a {@link com.pi4j.io.pwm.PwmConfigBuilder} object. */ @Deprecated public static PwmConfigBuilder newInstance(Context context) { @@ -62,11 +53,6 @@ public static PwmConfigBuilder newInstance(Context context) { } - /** - *

    newInstance.

    - * - * @return a {@link com.pi4j.io.pwm.PwmConfigBuilder} object. - */ public static PwmConfigBuilder newInstance() { return new DefaultPwmConfigBuilder(); } @@ -83,45 +69,30 @@ public PwmConfigBuilder address(Integer address) { return this; } - /** - * {@inheritDoc} - */ @Override public PwmConfigBuilder chip(Integer chip) { this.properties.put(PwmConfig.PWM_CHIP, chip.toString()); return this; } - /** - * {@inheritDoc} - */ @Override public PwmConfigBuilder channel(Integer channel) { this.properties.put(PwmConfig.PWM_CHANNEL, channel.toString()); return this; } - /** - * {@inheritDoc} - */ @Override public PwmConfigBuilder bcm(Integer bcm) { this.properties.put(PwmConfig.PWM_BCM, bcm.toString()); return this; } - /** - * {@inheritDoc} - */ @Override public PwmConfigBuilder frequency(Double frequency) { this.properties.put(PwmConfig.FREQUENCY_KEY, frequency.toString()); return this; } - /** - * {@inheritDoc} - */ @Override public PwmConfigBuilder dutyCycle(Double dutyCycle) { // bounds check the duty-cycle value @@ -133,27 +104,18 @@ public PwmConfigBuilder dutyCycle(Double dutyCycle) { return this; } - /** - * {@inheritDoc} - */ @Override public PwmConfigBuilder pwmType(PwmType pwmType) { this.properties.put(PwmConfig.PWM_TYPE_KEY, pwmType.toString()); return this; } - /** - * {@inheritDoc} - */ @Override public PwmConfigBuilder polarity(PwmPolarity polarity) { this.properties.put(PwmConfig.POLARITY_KEY, polarity.toString()); return this; } - /** - * {@inheritDoc} - */ @Override public PwmConfigBuilder shutdown(Double dutyCycle) { // bounds check the duty-cycle value @@ -165,9 +127,6 @@ public PwmConfigBuilder shutdown(Double dutyCycle) { return this; } - /** - * {@inheritDoc} - */ @Override public PwmConfigBuilder initial(Double dutyCycle) { // bounds check the duty-cycle value @@ -179,9 +138,6 @@ public PwmConfigBuilder initial(Double dutyCycle) { return this; } - /** - * {@inheritDoc} - */ @Override public PwmConfigBuilder preset(PwmPreset... preset) { for (PwmPreset p : preset) { @@ -190,9 +146,6 @@ public PwmConfigBuilder preset(PwmPreset... preset) { return this; } - /** - * {@inheritDoc} - */ @Override public PwmConfig build() { PwmConfig config = new DefaultPwmConfig(getResolvedProperties(), this.presets); diff --git a/pi4j-core/src/main/java/com/pi4j/io/pwm/impl/DefaultPwmPreset.java b/pi4j-core/src/main/java/com/pi4j/io/pwm/impl/DefaultPwmPreset.java index 8f95f9ff..828af016 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/pwm/impl/DefaultPwmPreset.java +++ b/pi4j-core/src/main/java/com/pi4j/io/pwm/impl/DefaultPwmPreset.java @@ -27,37 +27,18 @@ import com.pi4j.io.pwm.PwmPreset; -/** - *

    DefaultPwmPreset class.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id - */ public class DefaultPwmPreset implements PwmPreset { protected final String name; protected final Integer dutyCycle; protected final Integer frequency; - /** - *

    Constructor for DefaultPwmPreset.

    - * - * @param name a {@link java.lang.String} object. - * @param dutyCycle a {@link java.lang.Integer} object. - */ public DefaultPwmPreset(String name, Integer dutyCycle){ this.name = name.toLowerCase().trim(); this.dutyCycle = dutyCycle; this.frequency = null; } - /** - *

    Constructor for DefaultPwmPreset.

    - * - * @param name a {@link java.lang.String} object. - * @param dutyCycle a {@link java.lang.Integer} object. - * @param frequency a {@link java.lang.Integer} object. - */ public DefaultPwmPreset(String name, Integer dutyCycle, Integer frequency){ this.name = name.toLowerCase().trim(); @@ -73,21 +54,16 @@ public DefaultPwmPreset(String name, Integer dutyCycle, Integer frequency){ this.frequency = frequency; } - /** {@inheritDoc} */ @Override public String name() { return this.name; } - /** - * {@inheritDoc} - */ @Override public Integer dutyCycle() { return this.dutyCycle; } - /** {@inheritDoc} */ @Override public Integer frequency() { return this.frequency; diff --git a/pi4j-core/src/main/java/com/pi4j/io/pwm/impl/DefaultPwmPresetBuilder.java b/pi4j-core/src/main/java/com/pi4j/io/pwm/impl/DefaultPwmPresetBuilder.java index ca36e70c..1e7a1a3e 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/pwm/impl/DefaultPwmPresetBuilder.java +++ b/pi4j-core/src/main/java/com/pi4j/io/pwm/impl/DefaultPwmPresetBuilder.java @@ -28,12 +28,6 @@ import com.pi4j.io.pwm.PwmPreset; import com.pi4j.io.pwm.PwmPresetBuilder; -/** - *

    DefaultPwmPresetBuilder class.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id - */ public class DefaultPwmPresetBuilder implements PwmPresetBuilder{ protected Integer dutyCycle = null; protected Integer frequency = null; @@ -41,8 +35,6 @@ public class DefaultPwmPresetBuilder implements PwmPresetBuilder{ /** * PRIVATE CONSTRUCTOR - * - * @param name a {@link java.lang.String} object. */ protected DefaultPwmPresetBuilder(String name){ super(); this.name = name; @@ -58,14 +50,12 @@ public static PwmPresetBuilder newInstance(String name) { return new DefaultPwmPresetBuilder(name); } - /** {@inheritDoc} */ @Override public PwmPresetBuilder frequency(Integer frequency) { this.frequency = frequency; return this; } - /** {@inheritDoc} */ @Override public PwmPresetBuilder dutyCycle(Integer dutyCycle) { Integer dc = dutyCycle ; @@ -77,7 +67,6 @@ public PwmPresetBuilder dutyCycle(Integer dutyCycle) { this.dutyCycle = dc; return this; } - /** {@inheritDoc} */ @Override public PwmPreset build() { return new DefaultPwmPreset(this.name, this.dutyCycle, this.frequency); diff --git a/pi4j-core/src/main/java/com/pi4j/io/spi/Spi.java b/pi4j-core/src/main/java/com/pi4j/io/spi/Spi.java index a1b2d70b..e42e9d07 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/spi/Spi.java +++ b/pi4j-core/src/main/java/com/pi4j/io/spi/Spi.java @@ -36,9 +36,6 @@ /** *

    Spi interface.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface Spi extends IO, AutoCloseable, IODataWriter, IODataReader, SerialCircuitIO { /** @@ -70,12 +67,6 @@ public interface Spi extends IO, AutoCloseable, IOD */ int DEFAULT_READ_LSB_FIRST = 0; - /** - *

    newConfigBuilder.

    - * - * @param context {@link Context} - * @return a {@link com.pi4j.io.spi.SpiConfigBuilder} object. - */ static SpiConfigBuilder newConfigBuilder(Context context) { return SpiConfigBuilder.newInstance(); } @@ -88,14 +79,8 @@ static SpiConfigBuilder newConfigBuilder(Context context) { boolean isOpen(); - /** - *

    open.

    - */ void open(); - /** - *

    close.

    - */ void close(); // ------------------------------------------------------------------------------------ @@ -107,7 +92,6 @@ static SpiConfigBuilder newConfigBuilder(Context context) { * If no data is ready PI_SER_READ_NO_DATA is returned. * * @param handle the open serial device handle; (>=0, as returned by a call to serOpen) - * @param value a byte. * @return Returns the read byte (>=0) if OK, otherwise PI_BAD_HANDLE, PI_SER_READ_NO_DATA, or PI_SER_READ_FAILED. * @see "http://abyz.me.uk/rpi/pigpio/cif.html#serReadByte" */ diff --git a/pi4j-core/src/main/java/com/pi4j/io/spi/SpiBase.java b/pi4j-core/src/main/java/com/pi4j/io/spi/SpiBase.java index 80f807ee..e7ea895b 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/spi/SpiBase.java +++ b/pi4j-core/src/main/java/com/pi4j/io/spi/SpiBase.java @@ -31,38 +31,26 @@ /** *

    Abstract SpiBase class.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public abstract class SpiBase extends IOBase implements Spi { Logger logger = LoggerFactory.getLogger(this.getClass()); protected boolean isOpen = false; - /** - *

    Constructor for SpiBase.

    - * - * @param provider a {@link com.pi4j.io.spi.SpiProvider} object. - * @param config a {@link com.pi4j.io.spi.SpiConfig} object. - */ public SpiBase(SpiProvider provider, SpiConfig config) { super(provider, config); } - /** {@inheritDoc} */ @Override public boolean isOpen() { return this.isOpen; } - /** {@inheritDoc} */ @Override public void open() { logger.trace("invoked 'open()'"); } - /** {@inheritDoc} */ @Override public void close() { logger.trace("invoked 'closed()'"); diff --git a/pi4j-core/src/main/java/com/pi4j/io/spi/SpiBus.java b/pi4j-core/src/main/java/com/pi4j/io/spi/SpiBus.java index 47338d87..2e21ad0e 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/spi/SpiBus.java +++ b/pi4j-core/src/main/java/com/pi4j/io/spi/SpiBus.java @@ -25,12 +25,6 @@ * #L% */ -/** - *

    SpiBus class.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id - */ public enum SpiBus { BUS_0(0), BUS_1(1), BUS_2(2), BUS_3(3), BUS_4(4), BUS_5(5), BUS_6(6); @@ -42,29 +36,15 @@ private SpiBus(int bus) { /** *

    Getter for the field bus.

    - * - * @return a int. */ public int getBus() { return bus; } - /** - *

    getByNumber.

    - * - * @param bus a short. - * @return a {@link SpiBus} object. - */ public static SpiBus getByNumber(short bus) { return getByNumber((int) bus); } - /** - *

    getByNumber.

    - * - * @param bus a int. - * @return a {@link SpiBus} object. - */ public static SpiBus getByNumber(int bus) { for (var item : SpiBus.values()) { if (item.getBus() == bus) { @@ -74,12 +54,6 @@ public static SpiBus getByNumber(int bus) { return null; } - /** - *

    parse.

    - * - * @param bus a {@link String} object. - * @return a {@link SpiBus} object. - */ public static SpiBus parse(String bus) { if (bus.equalsIgnoreCase("0")) return SpiBus.BUS_0; if (bus.equalsIgnoreCase("1")) return SpiBus.BUS_1; diff --git a/pi4j-core/src/main/java/com/pi4j/io/spi/SpiChipSelect.java b/pi4j-core/src/main/java/com/pi4j/io/spi/SpiChipSelect.java index 510d3388..550564b1 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/spi/SpiChipSelect.java +++ b/pi4j-core/src/main/java/com/pi4j/io/spi/SpiChipSelect.java @@ -28,12 +28,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -/** - *

    SpiChipSelect class.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id - */ @Deprecated public enum SpiChipSelect { CS_0(0), CS_1(1), CS_2(2), CS_3(3), CS_4(4), CS_5(5), CS_6(6), CS_7(7), CS_8(8), CS_9(9), CS_10(10); @@ -47,29 +41,15 @@ private SpiChipSelect(int address) { /** *

    Getter for the field chipSelect.

    - * - * @return a int. */ public int getChipSelect() { return address; } - /** - *

    getByNumber.

    - * - * @param address a short. - * @return a {@link SpiChipSelect} object. - */ public static SpiChipSelect getByNumber(short address){ return getByNumber((int) address); } - /** - *

    getByNumber.

    - * - * @param address a int. - * @return a {@link SpiChipSelect} object. - */ public static SpiChipSelect getByNumber(int address){ for (var item : SpiChipSelect.values()){ if (item.getChipSelect() == address){ @@ -79,12 +59,6 @@ public static SpiChipSelect getByNumber(int address){ return null; } - /** - *

    parse.

    - * - * @param bus a {@link String} object. - * @return a {@link SpiChipSelect} object. - */ public static SpiChipSelect parse(String bus) { for (SpiChipSelect item : SpiChipSelect.values()) { try { diff --git a/pi4j-core/src/main/java/com/pi4j/io/spi/SpiConfig.java b/pi4j-core/src/main/java/com/pi4j/io/spi/SpiConfig.java index 60579b08..0d2affe8 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/spi/SpiConfig.java +++ b/pi4j-core/src/main/java/com/pi4j/io/spi/SpiConfig.java @@ -31,9 +31,6 @@ /** *

    SpiConfig interface.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface SpiConfig extends ChannelConfig, IOConfig { /** @@ -69,10 +66,6 @@ public interface SpiConfig extends ChannelConfig, IOConfig String READ_LSB_KEY = "read_lsb"; /** - *

    newBuilder.

    - * - * @param context {@link Context} - * @return a {@link com.pi4j.io.spi.SpiConfigBuilder} object. * @deprecated As of version 5, please use {@link #newBuilder()} instead. */ @Deprecated @@ -95,18 +88,8 @@ default int getUniqueIdentifier() { return (bus().getBus() << 8) + channel(); } - /** - *

    baud.

    - * - * @return a {@link java.lang.Integer} object. - */ Integer baud(); - /** - *

    getBaud.

    - * - * @return a {@link java.lang.Integer} object. - */ default Integer getBaud() { return baud(); } @@ -115,16 +98,9 @@ default Integer getBaud() { *

    ReadLsbFirst.

    * In accordance with the flags parm, Read operations * 0 is LSB bit shifted first, 1 MSB bit shifted first - * - * @return a {@link java.lang.Integer} object. */ Integer readLsbFirst(); - /** - *

    getreadLsbfISRT.

    - * - * @return a {@link java.lang.Integer} object. - */ default Integer getReadLsbFirst() { return readLsbFirst(); } @@ -134,16 +110,9 @@ default Integer getReadLsbFirst() { *

    WriteLsbFirst.

    * In accordance with the flags parm, Write operations * 0 is LSB bit shifted first, 1 MSB bit shifted first - * - * @return a {@link java.lang.Integer} object. */ Integer writeLsbFirst(); - /** - *

    getreadLsbfISRT.

    - * - * @return a {@link java.lang.Integer} object. - */ default Integer getWriteLsbFirst() { return writeLsbFirst(); } @@ -153,64 +122,27 @@ default Integer getWriteLsbFirst() { *

    If the Bus value is configured, that SpiBus * value will be set in the flags {@link #flags()} bit 'A' 8 *

    - * - * @return a {@link com.pi4j.io.spi.SpiBus} object. */ SpiBus bus(); - /** - *

    getBus.

    - * - * @return a {@link com.pi4j.io.spi.SpiBus} object. - */ default SpiBus getBus() { return bus(); } - /** - *

    busUserProvided.

    - * - * @return a boolean. - */ boolean busUserProvided(); - /** - *

    getBusUserProvided.

    - * - * @return a {@link java.lang.Boolean} object. - */ default boolean getBusUserProvided() { return busUserProvided(); } - /** - *

    writeLsbFirstserProvided.

    - * - * @return a boolean. - */ boolean writeLsbFirstUserProvided(); - /** - *

    getWriteLsbFirstUserProvided.

    - * - * @return a {@link java.lang.Boolean} object. - */ default boolean getWriteLsbFIrstUserProvided() { return writeLsbFirstUserProvided(); } - /** - *

    writeLsbFirstserProvided.

    - * - * @return a boolean. - */ boolean readLsbFirstUserProvided(); - /** - *

    getReadLsbFirstUserProvided.

    - * - * @return a {@link java.lang.Boolean} object. - */ default boolean getReadLsbFIrstUserProvided() { return readLsbFirstUserProvided(); } @@ -221,63 +153,32 @@ default boolean getReadLsbFIrstUserProvided() { *

    If the Mode value is configured, that SpiMode * value will be set in the flags {@link #mode()} bit 'm m' 1:0 *

    - * - * @return a {@link com.pi4j.io.spi.SpiMode} object. */ SpiMode mode(); - /** - *

    getMode.

    - * - * @return a {@link com.pi4j.io.spi.SpiMode} object. - */ default SpiMode getMode() { return mode(); } - /** - *

    modeUserProvided.

    - * - * @return a boolean. - */ boolean modeUserProvided(); - /** - *

    bgetModeUserProvided.

    - * - * @return a {@link java.lang.Boolean} object. - */ default boolean getModeUserProvided() { return modeUserProvided(); } - /** - *

    flags.

    - * - * @return a {@link java.lang.Long} object. - */ Long flags(); - /** - *

    getFlags.

    - * - * @return a {@link java.lang.Long} object. - */ default Long getFlags() { return flags(); } /** *

    channel. (ALIAS for 'address')

    - * - * @return a {@link java.lang.Integer} object. */ Integer channel(); /** *

    getFlags. (ALIAS for 'getAddress')

    - * - * @return a {@link java.lang.Long} object. */ default Integer getChannel() { return channel(); @@ -285,15 +186,11 @@ default Integer getChannel() { /** *

    chipSelect. (ALIAS for 'address')

    - * - * @return a {@link com.pi4j.io.spi.SpiChipSelect} object. */ SpiChipSelect chipSelect(); /** *

    getFlags. (ALIAS for 'getAddress')

    - * - * @return a {@link com.pi4j.io.spi.SpiChipSelect} object. */ default SpiChipSelect getChipSelect() { return chipSelect(); diff --git a/pi4j-core/src/main/java/com/pi4j/io/spi/SpiConfigBuilder.java b/pi4j-core/src/main/java/com/pi4j/io/spi/SpiConfigBuilder.java index 6d33cc4b..1e9a93dc 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/spi/SpiConfigBuilder.java +++ b/pi4j-core/src/main/java/com/pi4j/io/spi/SpiConfigBuilder.java @@ -31,18 +31,9 @@ /** *

    SpiConfigBuilder interface.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface SpiConfigBuilder extends IOBcmConfigBuilder { - /** - *

    newInstance.

    - * - * @param context {@link Context} - * @return a {@link com.pi4j.io.spi.SpiConfigBuilder} object. - */ @Deprecated static SpiConfigBuilder newInstance(Context context) { return DefaultSpiConfigBuilder.newInstance(context); @@ -52,29 +43,11 @@ static SpiConfigBuilder newInstance() { return DefaultSpiConfigBuilder.newInstance(); } - /** - *

    readLsbFirst.

    - * - * @param shift a {@link java.lang.Integer} object. - * @return a {@link com.pi4j.io.spi.SpiConfigBuilder} object. - */ SpiConfigBuilder readLsbFirst(Integer shift); - /** - *

    writeLsbFirst.

    - * - * @param shift a {@link java.lang.Integer} object. - * @return a {@link com.pi4j.io.spi.SpiConfigBuilder} object. - */ SpiConfigBuilder writeLsbFirst(Integer shift); - /** - *

    baud.

    - * - * @param rate a {@link java.lang.Integer} object. - * @return a {@link com.pi4j.io.spi.SpiConfigBuilder} object. - */ SpiConfigBuilder baud(Integer rate); @@ -83,18 +56,9 @@ static SpiConfigBuilder newInstance() { *

    If the Bus value is configured, that SpiBus * value will be set in the flags {@link #flags(Long)} bit 'A' 8 *

    - * - * @param bus a {@link com.pi4j.io.spi.SpiBus} object. - * @return a {@link com.pi4j.io.spi.SpiConfigBuilder} object. */ SpiConfigBuilder bus(SpiBus bus); - /** - *

    bus.

    - * - * @param bus a {@link java.lang.Integer} object. - * @return a {@link com.pi4j.io.spi.SpiConfigBuilder} object. - */ default SpiConfigBuilder bus(Integer bus) { return bus(SpiBus.getByNumber(bus)); } @@ -104,27 +68,15 @@ default SpiConfigBuilder bus(Integer bus) { *

    If the Mode value is configured, that SpiMode * value will be set in the flags {@link #flags(Long)} bit 'm m' 1:0 *

    - * - * @param mode a {@link com.pi4j.io.spi.SpiMode} object. - * @return a {@link com.pi4j.io.spi.SpiConfigBuilder} object. */ SpiConfigBuilder mode(SpiMode mode); - /** - *

    mode.

    - * - * @param mode a {@link java.lang.Integer} object. - * @return a {@link com.pi4j.io.spi.SpiConfigBuilder} object. - */ default SpiConfigBuilder mode(Integer mode) { return mode(SpiMode.getByNumber(mode)); } /** - *

    flags.

    - * * @param flags a {@link java.lang.Long} value. - * @return a {@link com.pi4j.io.spi.SpiConfigBuilder} object. */ SpiConfigBuilder flags(Long flags); @@ -132,7 +84,6 @@ default SpiConfigBuilder mode(Integer mode) { *

    channel. (ALIAS for 'address')

    * * @param channel a {@link java.lang.Integer} value. - * @return a {@link com.pi4j.io.spi.SpiConfigBuilder} object. */ SpiConfigBuilder channel(Integer channel); @@ -140,7 +91,6 @@ default SpiConfigBuilder mode(Integer mode) { *

    chipSelect. (ALIAS for 'address')

    * * @param chipSelect a {@link com.pi4j.io.spi.SpiChipSelect} value. - * @return a {@link com.pi4j.io.spi.SpiConfigBuilder} object. */ SpiConfigBuilder chipSelect(SpiChipSelect chipSelect); } diff --git a/pi4j-core/src/main/java/com/pi4j/io/spi/SpiMode.java b/pi4j-core/src/main/java/com/pi4j/io/spi/SpiMode.java index a1327cba..2538d77a 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/spi/SpiMode.java +++ b/pi4j-core/src/main/java/com/pi4j/io/spi/SpiMode.java @@ -25,12 +25,6 @@ * #L% */ -/** - *

    SpiMode class.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id - */ public enum SpiMode { MODE_0(0), MODE_1(1), MODE_2(2), MODE_3(3); @@ -42,29 +36,15 @@ private SpiMode(int mode) { /** *

    Getter for the field mode.

    - * - * @return a int. */ public int getMode() { return mode; } - /** - *

    getByNumber.

    - * - * @param modeNumber a short. - * @return a {@link com.pi4j.io.spi.SpiMode} object. - */ public static SpiMode getByNumber(short modeNumber){ return getByNumber((int)modeNumber); } - /** - *

    getByNumber.

    - * - * @param modeNumber a int. - * @return a {@link com.pi4j.io.spi.SpiMode} object. - */ public static SpiMode getByNumber(int modeNumber){ for(var item : SpiMode.values()){ if(item.getMode() == modeNumber){ @@ -74,12 +54,6 @@ public static SpiMode getByNumber(int modeNumber){ return null; } - /** - *

    parse.

    - * - * @param mode a {@link java.lang.String} object. - * @return a {@link com.pi4j.io.spi.SpiMode} object. - */ public static SpiMode parse(String mode) { if(mode.equalsIgnoreCase("0")) return SpiMode.MODE_0; if(mode.equalsIgnoreCase("1")) return SpiMode.MODE_1; diff --git a/pi4j-core/src/main/java/com/pi4j/io/spi/SpiProvider.java b/pi4j-core/src/main/java/com/pi4j/io/spi/SpiProvider.java index 83a3e272..75c5f4f1 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/spi/SpiProvider.java +++ b/pi4j-core/src/main/java/com/pi4j/io/spi/SpiProvider.java @@ -30,9 +30,6 @@ /** *

    SpiProvider interface.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface SpiProvider extends Provider { diff --git a/pi4j-core/src/main/java/com/pi4j/io/spi/SpiProviderBase.java b/pi4j-core/src/main/java/com/pi4j/io/spi/SpiProviderBase.java index d4261df2..49f59ae8 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/spi/SpiProviderBase.java +++ b/pi4j-core/src/main/java/com/pi4j/io/spi/SpiProviderBase.java @@ -28,36 +28,19 @@ */ /** *

    Abstract SpiProviderBase class.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public abstract class SpiProviderBase extends ProviderBase implements SpiProvider { - /** - *

    Constructor for SpiProviderBase.

    - */ public SpiProviderBase(){ super(); } - /** - *

    Constructor for SpiProviderBase.

    - * - * @param id a {@link java.lang.String} object. - */ public SpiProviderBase(String id){ super(id); } - /** - *

    Constructor for SpiProviderBase.

    - * - * @param id a {@link java.lang.String} object. - * @param name a {@link java.lang.String} object. - */ public SpiProviderBase(String id, String name){ super(id, name); } diff --git a/pi4j-core/src/main/java/com/pi4j/io/spi/impl/DefaultSpiConfig.java b/pi4j-core/src/main/java/com/pi4j/io/spi/impl/DefaultSpiConfig.java index c57a341b..4569769c 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/spi/impl/DefaultSpiConfig.java +++ b/pi4j-core/src/main/java/com/pi4j/io/spi/impl/DefaultSpiConfig.java @@ -31,12 +31,6 @@ import java.util.Map; -/** - *

    DefaultSpiConfig class.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id - */ public class DefaultSpiConfig extends IOConfigBase implements SpiConfig { @@ -56,8 +50,6 @@ public class DefaultSpiConfig /** * PRIVATE CONSTRUCTOR - * - * @param properties a {@link java.util.Map} object. */ protected DefaultSpiConfig(Map properties) { super(properties); @@ -121,107 +113,68 @@ protected DefaultSpiConfig(Map properties) { this.description = StringUtil.setIfNullOrEmpty(this.description, "SPI-" + this.bus().getBus() + "." + this.channel(), true); } - /** - * {@inheritDoc} - */ @Override public Integer channel() { return this.channel; } - /** - * {@inheritDoc} - */ @Override public int getUniqueIdentifier() { return (bus.getBus() << 8) + channel(); } - /** - * {@inheritDoc} - */ @Override public Integer baud() { return this.baud; } - /** - * {@inheritDoc} - */ @Override public Integer readLsbFirst() { return this.readLsbFirst; } - /** - * {@inheritDoc} - */ @Override public Integer writeLsbFirst() { return this.writeLsbFirst; } - /** - * {@inheritDoc} - */ @Override public boolean busUserProvided() { return this.busUserProvided; } - /** - * {@inheritDoc} - */ @Override public boolean writeLsbFirstUserProvided() { return this.writeLsbFirstUserProvided; } - /** - * {@inheritDoc} - */ @Override public boolean readLsbFirstUserProvided() { return this.readLsbFirstUserProvided; } - /** - * {@inheritDoc} - */ @Override public boolean modeUserProvided() { return this.modeUserProvided; } - /** - * {@inheritDoc} - */ @Override public SpiBus bus() { return this.bus; } - /** - * {@inheritDoc} - */ @Override public SpiMode mode() { return this.mode; } - /** - * {@inheritDoc} - */ @Override public Long flags() { return this.flags; } - /** - * {@inheritDoc} - */ @Override public SpiChipSelect chipSelect() { return SpiChipSelect.getByNumber(this.channel()); diff --git a/pi4j-core/src/main/java/com/pi4j/io/spi/impl/DefaultSpiConfigBuilder.java b/pi4j-core/src/main/java/com/pi4j/io/spi/impl/DefaultSpiConfigBuilder.java index 559d5725..ecafc586 100644 --- a/pi4j-core/src/main/java/com/pi4j/io/spi/impl/DefaultSpiConfigBuilder.java +++ b/pi4j-core/src/main/java/com/pi4j/io/spi/impl/DefaultSpiConfigBuilder.java @@ -29,12 +29,6 @@ import com.pi4j.io.impl.IOBcmConfigBuilderBase; import com.pi4j.io.spi.*; -/** - *

    DefaultSpiConfigBuilder class.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id - */ public class DefaultSpiConfigBuilder extends IOBcmConfigBuilderBase implements SpiConfigBuilder { @@ -46,38 +40,24 @@ protected DefaultSpiConfigBuilder() { } /** - *

    newInstance.

    - * * @param context - * @return a {@link com.pi4j.io.spi.SpiConfigBuilder} object. */ @Deprecated public static SpiConfigBuilder newInstance(Context context) { return newInstance(); } - /** - *

    newInstance.

    - * - * @return a {@link com.pi4j.io.spi.SpiConfigBuilder} object. - */ public static SpiConfigBuilder newInstance() { return new DefaultSpiConfigBuilder(); } - /** - * {@inheritDoc} - */ @Override public SpiConfigBuilder readLsbFirst(Integer shift) { this.properties.put(SpiConfig.READ_LSB_KEY, shift.toString()); return this; } - /** - * {@inheritDoc} - */ @Override public SpiConfigBuilder writeLsbFirst(Integer shift) { this.properties.put(SpiConfig.WRITE_LSB_KEY, shift.toString()); @@ -96,63 +76,42 @@ public SpiConfigBuilder address(Integer address) { return this; } - /** - * {@inheritDoc} - */ @Override public SpiConfigBuilder bus(SpiBus bus) { this.properties.put(SpiConfig.BUS_KEY, Integer.toString(bus.getBus())); return this; } - /** - * {@inheritDoc} - */ @Override public SpiConfigBuilder baud(Integer rate) { this.properties.put(SpiConfig.BAUD_KEY, rate.toString()); return this; } - /** - * {@inheritDoc} - */ @Override public SpiConfigBuilder mode(SpiMode mode) { this.properties.put(SpiConfig.MODE_KEY, Integer.toString(mode.getMode())); return this; } - /** - * {@inheritDoc} - */ @Override public SpiConfigBuilder flags(Long flags) { this.properties.put(SpiConfig.FLAGS_KEY, flags.toString()); return this; } - /** - * {@inheritDoc} - */ @Override public SpiConfigBuilder channel(Integer channel) { this.properties.put(SpiConfig.CHANNEL_KEY, channel.toString()); return this; } - /** - * {@inheritDoc} - */ @Override public SpiConfigBuilder chipSelect(SpiChipSelect chipSelect) { this.properties.put(SpiConfig.CHANNEL_KEY, Integer.toString(chipSelect.getChipSelect())); return this; } - /** - * {@inheritDoc} - */ @Override public SpiConfig build() { SpiConfig config = new DefaultSpiConfig(this.properties); diff --git a/pi4j-core/src/main/java/com/pi4j/provider/Provider.java b/pi4j-core/src/main/java/com/pi4j/provider/Provider.java index b3721c4a..8ac31774 100644 --- a/pi4j-core/src/main/java/com/pi4j/provider/Provider.java +++ b/pi4j-core/src/main/java/com/pi4j/provider/Provider.java @@ -37,8 +37,6 @@ /** *

    Provider interface.

    * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id * @param * @param * @param @@ -47,25 +45,9 @@ public interface Providercreate.

    - * - * @param config a CONFIG_TYPE object. - * @return a IO_TYPE object. - */ IO_TYPE create(CONFIG_TYPE config); - /** - *

    type.

    - * - * @return a {@link com.pi4j.io.IOType} object. - */ default IOType type() { return IOType.getByProviderClass(this.getClass()); } - /** - *

    getType.

    - * - * @return a {@link com.pi4j.io.IOType} object. - */ default IOType getType() { return type(); } /** @@ -77,15 +59,8 @@ default int getPriority() { return 0; } - /** - *

    isType.

    - * - * @param type a {@link com.pi4j.io.IOType} object. - * @return a boolean. - */ default boolean isType(IOType type) { return this.type().isType(type); } - /** {@inheritDoc} */ @Override default Descriptor describe() { Descriptor descriptor = Extension.super.describe(); diff --git a/pi4j-core/src/main/java/com/pi4j/provider/ProviderBase.java b/pi4j-core/src/main/java/com/pi4j/provider/ProviderBase.java index de1c3490..7e2522f6 100644 --- a/pi4j-core/src/main/java/com/pi4j/provider/ProviderBase.java +++ b/pi4j-core/src/main/java/com/pi4j/provider/ProviderBase.java @@ -40,8 +40,6 @@ /** *

    Abstract ProviderBase class.

    * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id * @param * @param * @param @@ -53,40 +51,24 @@ public abstract class ProviderBaseConstructor for ProviderBase.

    - */ public ProviderBase(){ super(); } - /** - *

    Constructor for ProviderBase.

    - * - * @param id a {@link java.lang.String} object. - */ public ProviderBase(String id){ super(id); } - /** - *

    Constructor for ProviderBase.

    - * - * @param id a {@link java.lang.String} object. - * @param name a {@link java.lang.String} object. - */ public ProviderBase(String id, String name){ super(id, name); } - /** {@inheritDoc} */ @Override public PROVIDER_TYPE initialize(Context context) throws InitializeException { this.context = context; return (PROVIDER_TYPE)this; } - /** {@inheritDoc} */ @Override public PROVIDER_TYPE shutdownInternal(Context context) throws ShutdownException { @@ -104,7 +86,6 @@ public PROVIDER_TYPE shutdownInternal(Context context) throws ShutdownException return (PROVIDER_TYPE)this; } - /** {@inheritDoc} */ @Override public Context context(){ return this.context; diff --git a/pi4j-core/src/main/java/com/pi4j/provider/ProviderGroup.java b/pi4j-core/src/main/java/com/pi4j/provider/ProviderGroup.java index 328f2e34..e7e898ed 100644 --- a/pi4j-core/src/main/java/com/pi4j/provider/ProviderGroup.java +++ b/pi4j-core/src/main/java/com/pi4j/provider/ProviderGroup.java @@ -35,10 +35,6 @@ import org.slf4j.LoggerFactory; /** - *

    ProviderGroup class.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id * @param */ public class ProviderGroup implements Describable { @@ -50,9 +46,6 @@ public class ProviderGroup implements Describable { /** * Default Constructor - * - * @param type a {@link com.pi4j.io.IOType} object. - * @param providers a {@link com.pi4j.provider.Providers} object. */ public ProviderGroup(Providers providers, IOType type){ this.providers = providers; @@ -63,10 +56,6 @@ private Map all() throws ProviderException { } /** - *

    get.

    - * - * @param providerId a {@link java.lang.String} object. - * @return a T object. * @throws com.pi4j.provider.exception.ProviderException if any. */ public T get(String providerId) throws ProviderException { @@ -74,17 +63,12 @@ public T get(String providerId) throws ProviderException { } /** - *

    exists.

    - * - * @param providerId a {@link java.lang.String} object. - * @return a boolean. * @throws com.pi4j.provider.exception.ProviderException if any. */ public boolean exists(String providerId) throws ProviderException { return providers.exists(providerId, type); } - /** {@inheritDoc} */ @Override public Descriptor describe() { Descriptor descriptor = Descriptor.create() diff --git a/pi4j-core/src/main/java/com/pi4j/provider/Providers.java b/pi4j-core/src/main/java/com/pi4j/provider/Providers.java index d3fbbb81..5f936e79 100644 --- a/pi4j-core/src/main/java/com/pi4j/provider/Providers.java +++ b/pi4j-core/src/main/java/com/pi4j/provider/Providers.java @@ -47,61 +47,29 @@ * platform. Pi4J supports the following platforms: RaspberryPi, BananaPi, BananaPro, Odroid. *

    * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id * @see http://www.pi4j.com/ */ public interface Providers extends Describable { - /** - *

    digitalInput.

    - * - * @return a {@link com.pi4j.provider.ProviderGroup} object. - */ ProviderGroup digitalInput(); - /** - *

    digitalOutput.

    - * - * @return a {@link com.pi4j.provider.ProviderGroup} object. - */ ProviderGroup digitalOutput(); - /** - *

    pwm.

    - * - * @return a {@link com.pi4j.provider.ProviderGroup} object. - */ ProviderGroup pwm(); - /** - *

    spi.

    - * - * @return a {@link com.pi4j.provider.ProviderGroup} object. - */ ProviderGroup spi(); - /** - *

    i2c.

    - * - * @return a {@link com.pi4j.provider.ProviderGroup} object. - */ ProviderGroup i2c(); /** * Get all providers - * - * @return a {@link java.util.Map} object. */ Map all(); /** * Get all providers of a specified io class/interface. * - * @param providerClass a {@link java.lang.Class} object. * @param providers extending the {@link com.pi4j.provider.Provider} interface - * @return a {@link java.util.Map} object. * @throws com.pi4j.provider.exception.ProviderNotFoundException if any. */ Map all(Class providerClass) throws ProviderNotFoundException; @@ -109,29 +77,13 @@ public interface Providers extends Describable { /** * Get all providers of a specified io type. * - * @param ioType a {@link com.pi4j.io.IOType} object. * @param providers extending the {@link com.pi4j.provider.Provider} interface - * @return a {@link java.util.Map} object. * @throws com.pi4j.provider.exception.ProviderNotFoundException if any. */ Map all(IOType ioType) throws ProviderNotFoundException; - /** - *

    exists.

    - * - * @param providerId a {@link java.lang.String} object. - * @return a boolean. - */ boolean exists(String providerId); - /** - *

    exists.

    - * - * @param providerId a {@link java.lang.String} object. - * @param providerClass a {@link java.lang.Class} object. - * @param a T object. - * @return a boolean. - */ default boolean exists(String providerId, Class providerClass) { // determine if the requested provider exists by ID and PROVIDER CLASS/TYPE try { @@ -141,14 +93,6 @@ default boolean exists(String providerId, Class provider } } - /** - *

    exists.

    - * - * @param providerId a {@link java.lang.String} object. - * @param ioType a {@link com.pi4j.io.IOType} object. - * @param a T object. - * @return a boolean. - */ default boolean exists(String providerId, IOType ioType) { // determine if the requested provider exists by ID and IO TYPE try { @@ -158,13 +102,6 @@ default boolean exists(String providerId, IOType ioType) { } } - /** - *

    exists.

    - * - * @param ioType a {@link com.pi4j.io.IOType} object. - * @param a T object. - * @return a boolean. - */ default boolean exists(IOType ioType) { // return the provider instance from the managed provider map that contains the given provider-class try { @@ -174,13 +111,6 @@ default boolean exists(IOType ioType) { } } - /** - *

    exists.

    - * - * @param providerClass a {@link java.lang.Class} object. - * @param a T object. - * @return a boolean. - */ default boolean exists(Class providerClass) { // return the provider instance from the managed provider map that contains the given provider-class try { @@ -191,22 +121,11 @@ default boolean exists(Class providerClass) { } /** - *

    get.

    - * - * @param providerId a {@link java.lang.String} object. - * @param a T object. - * @return a T object. * @throws com.pi4j.provider.exception.ProviderNotFoundException if any. */ T get(String providerId) throws ProviderNotFoundException; /** - *

    get.

    - * - * @param providerId a {@link java.lang.String} object. - * @param providerClass a {@link java.lang.Class} object. - * @param a T object. - * @return a T object. * @throws com.pi4j.provider.exception.ProviderNotFoundException if any. * @throws com.pi4j.provider.exception.ProviderTypeException if any. */ @@ -220,12 +139,6 @@ default T get(String providerId, Class providerClass) th } /** - *

    get.

    - * - * @param providerId a {@link java.lang.String} object. - * @param ioType a {@link com.pi4j.io.IOType} object. - * @param a T object. - * @return a T object. * @throws com.pi4j.provider.exception.ProviderNotFoundException if any. * @throws com.pi4j.provider.exception.ProviderIOTypeException if any. */ @@ -239,11 +152,6 @@ default T get(String providerId, IOType ioType) throws Prov } /** - *

    get.

    - * - * @param providerClass a {@link java.lang.Class} object. - * @param a T object. - * @return a T object. * @throws com.pi4j.provider.exception.ProviderNotFoundException if any. */ default T get(Class providerClass) throws ProviderNotFoundException { @@ -257,11 +165,6 @@ default T get(Class providerClass) throws ProviderNotFou } /** - *

    get.

    - * - * @param ioType a {@link com.pi4j.io.IOType} object. - * @param a T object. - * @return a T object. * @throws com.pi4j.provider.exception.ProviderNotFoundException if any. */ default T get(IOType ioType) throws ProviderNotFoundException { @@ -277,66 +180,31 @@ default T get(IOType ioType) throws ProviderNotFoundExcepti // DEFAULT METHODS - /** - *

    getDigitalInput.

    - * - * @return a {@link com.pi4j.provider.ProviderGroup} object. - */ default ProviderGroup getDigitalInputProviders() { return digitalInput(); } - /** - *

    getDigitalOutput.

    - * - * @return a {@link com.pi4j.provider.ProviderGroup} object. - */ default ProviderGroup getDigitalOutputProviders() { return digitalOutput(); } - /** - *

    getPwm.

    - * - * @return a {@link com.pi4j.provider.ProviderGroup} object. - */ default ProviderGroup getPwmProviders() { return pwm(); } - /** - *

    getSpi.

    - * - * @return a {@link com.pi4j.provider.ProviderGroup} object. - */ default ProviderGroup getSpiProviders() { return spi(); } - /** - *

    getI2C.

    - * - * @return a {@link com.pi4j.provider.ProviderGroup} object. - */ default ProviderGroup getI2CProviders() { return i2c(); } - /** - *

    getAll.

    - * - * @return a {@link java.util.Map} object. - */ default Map getAll() { return all(); } /** - *

    getAll.

    - * - * @param providerClass a {@link java.lang.Class} object. - * @param a T object. - * @return a {@link java.util.Map} object. * @throws com.pi4j.provider.exception.ProviderNotFoundException if any. */ default Map getAll(Class providerClass) throws ProviderNotFoundException { @@ -344,22 +212,12 @@ default Map getAll(Class providerClass) throw } /** - *

    getAll.

    - * - * @param ioType a {@link com.pi4j.io.IOType} object. - * @param a T object. - * @return a {@link java.util.Map} object. * @throws com.pi4j.provider.exception.ProviderNotFoundException if any. */ default Map getAll(IOType ioType) throws ProviderNotFoundException { return all(ioType); } - /** - *

    describe.

    - * - * @return a {@link com.pi4j.common.Descriptor} object. - */ default Descriptor describe() { var providers = all(); diff --git a/pi4j-core/src/main/java/com/pi4j/provider/exception/ProviderAlreadyExistsException.java b/pi4j-core/src/main/java/com/pi4j/provider/exception/ProviderAlreadyExistsException.java index 35d211a0..e1681069 100644 --- a/pi4j-core/src/main/java/com/pi4j/provider/exception/ProviderAlreadyExistsException.java +++ b/pi4j-core/src/main/java/com/pi4j/provider/exception/ProviderAlreadyExistsException.java @@ -32,16 +32,11 @@ *

    * * @see http://www.pi4j.com/ - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public class ProviderAlreadyExistsException extends ProviderException { /** * Default Constructor - * - * @param providerId a {@link java.lang.String} object. */ public ProviderAlreadyExistsException(String providerId){ super("The Pi4J io [" + providerId + "] already exists."); diff --git a/pi4j-core/src/main/java/com/pi4j/provider/exception/ProviderException.java b/pi4j-core/src/main/java/com/pi4j/provider/exception/ProviderException.java index 4f2c6b11..3c97a42f 100644 --- a/pi4j-core/src/main/java/com/pi4j/provider/exception/ProviderException.java +++ b/pi4j-core/src/main/java/com/pi4j/provider/exception/ProviderException.java @@ -35,9 +35,6 @@ *

    * * @see http://www.pi4j.com/ - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public class ProviderException extends ExtensionException { @@ -50,31 +47,14 @@ public ProviderException(String message){ super(message); } - /** - *

    Constructor for ProviderException.

    - * - * @param cause a {@link java.lang.Throwable} object. - */ public ProviderException(Throwable cause){ super(cause); } - /** - *

    Constructor for ProviderException.

    - * - * @param message a {@link java.lang.String} object. - * @param cause a {@link java.lang.Throwable} object. - */ public ProviderException(String message, Throwable cause){ super(message,cause); } - /** - *

    Constructor for ProviderException.

    - * - * @param provider a {@link com.pi4j.provider.Provider} object. - * @param cause a {@link java.lang.Throwable} object. - */ public ProviderException(Provider provider, Throwable cause){ super("Provider exception: " + provider.id() + "(" + provider.getClass().getName() + ")",cause); } diff --git a/pi4j-core/src/main/java/com/pi4j/provider/exception/ProviderIOTypeException.java b/pi4j-core/src/main/java/com/pi4j/provider/exception/ProviderIOTypeException.java index cef4bfc7..31b7c9a8 100644 --- a/pi4j-core/src/main/java/com/pi4j/provider/exception/ProviderIOTypeException.java +++ b/pi4j-core/src/main/java/com/pi4j/provider/exception/ProviderIOTypeException.java @@ -36,17 +36,11 @@ *

    * * @see http://www.pi4j.com/ - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public class ProviderIOTypeException extends ProviderException { /** * Default Constructor - * - * @param provider a {@link com.pi4j.provider.Provider} object. - * @param ioType a {@link com.pi4j.io.IOType} object. */ public ProviderIOTypeException(Provider provider, IOType ioType){ super("Pi4J provider IO type mismatch for [" + provider.id() + "(" + provider.type().name() + ")]; provider instance is not of IO type [" + ioType.name() + "]"); diff --git a/pi4j-core/src/main/java/com/pi4j/provider/exception/ProviderInitializeException.java b/pi4j-core/src/main/java/com/pi4j/provider/exception/ProviderInitializeException.java index b15a665b..0e684c3e 100644 --- a/pi4j-core/src/main/java/com/pi4j/provider/exception/ProviderInitializeException.java +++ b/pi4j-core/src/main/java/com/pi4j/provider/exception/ProviderInitializeException.java @@ -33,17 +33,11 @@ *

    * * @see http://www.pi4j.com/ - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public class ProviderInitializeException extends ProviderException { /** * Default Constructor - * - * @param providerId a {@link java.lang.String} object. - * @param ex a {@link java.lang.Throwable} object. */ public ProviderInitializeException(String providerId, Throwable ex){ super("Pi4J io [" + providerId + "] failed to initialize(); " + ex.getMessage(), ex); diff --git a/pi4j-core/src/main/java/com/pi4j/provider/exception/ProviderInterfaceException.java b/pi4j-core/src/main/java/com/pi4j/provider/exception/ProviderInterfaceException.java index 4bc944c4..fe96d0ce 100644 --- a/pi4j-core/src/main/java/com/pi4j/provider/exception/ProviderInterfaceException.java +++ b/pi4j-core/src/main/java/com/pi4j/provider/exception/ProviderInterfaceException.java @@ -35,16 +35,11 @@ *

    * * @see http://www.pi4j.com/ - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public class ProviderInterfaceException extends ProviderException { /** * Default Constructor - * - * @param providerClass a {@link java.lang.Class} object. */ public ProviderInterfaceException(Class providerClass){ super("Pi4J provider class [" + providerClass + "] is not an Interface but rather a concrete class. Please specify an Interface when requesting a provider by type."); diff --git a/pi4j-core/src/main/java/com/pi4j/provider/exception/ProviderNotFoundException.java b/pi4j-core/src/main/java/com/pi4j/provider/exception/ProviderNotFoundException.java index 43304464..d4e34837 100644 --- a/pi4j-core/src/main/java/com/pi4j/provider/exception/ProviderNotFoundException.java +++ b/pi4j-core/src/main/java/com/pi4j/provider/exception/ProviderNotFoundException.java @@ -36,9 +36,6 @@ *

    * * @see http://www.pi4j.com/ - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public class ProviderNotFoundException extends ProviderException { @@ -51,8 +48,6 @@ public ProviderNotFoundException(){ /** * Alternate Constructor - * - * @param providerId a {@link java.lang.String} object. */ public ProviderNotFoundException(String providerId){ super("Pi4J provider [" + providerId + "] could not be found. Please include this 'provider' JAR in the classpath."); @@ -60,8 +55,6 @@ public ProviderNotFoundException(String providerId){ /** * Alternate Constructor - * - * @param ioType a {@link com.pi4j.io.IOType} object. */ public ProviderNotFoundException(IOType ioType){ super("Pi4J provider IO type [" + ioType + "] could not be found. Please include this 'provider' JAR in the classpath for this provider type."); @@ -69,9 +62,6 @@ public ProviderNotFoundException(IOType ioType){ /** * Alternate Constructor - * - * @param providerId a {@link java.lang.String} object. - * @param ioType {@link IOType}. */ public ProviderNotFoundException(String providerId, IOType ioType){ super("Pi4J provider [" + providerId + "] of type [" + ioType + "] could not be found. Please include this 'provider' JAR in the classpath."); @@ -80,7 +70,6 @@ public ProviderNotFoundException(String providerId, IOType ioType){ /** * Alternate Constructor * - * @param providerId a {@link java.lang.String} object. * @param providerClass a {@link Class} object of type {@link Provider}. */ public ProviderNotFoundException(String providerId, Class providerClass){ diff --git a/pi4j-core/src/main/java/com/pi4j/provider/exception/ProviderTypeException.java b/pi4j-core/src/main/java/com/pi4j/provider/exception/ProviderTypeException.java index 25eb0e53..e1a43e22 100644 --- a/pi4j-core/src/main/java/com/pi4j/provider/exception/ProviderTypeException.java +++ b/pi4j-core/src/main/java/com/pi4j/provider/exception/ProviderTypeException.java @@ -35,17 +35,11 @@ *

    * * @see http://www.pi4j.com/ - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public class ProviderTypeException extends ProviderException { /** * Default Constructor - * - * @param provider a {@link com.pi4j.provider.Provider} object. - * @param providerClass a {@link java.lang.Class} object. */ public ProviderTypeException(Provider provider, Class providerClass){ super("Pi4J provider type mismatch for [" + provider.id() + "(" + provider.getClass().getName() + ")]; provider instance is not of type [" + providerClass.getName() + "]"); diff --git a/pi4j-core/src/main/java/com/pi4j/registry/Registry.java b/pi4j-core/src/main/java/com/pi4j/registry/Registry.java index f8f21cb9..98a5da52 100644 --- a/pi4j-core/src/main/java/com/pi4j/registry/Registry.java +++ b/pi4j-core/src/main/java/com/pi4j/registry/Registry.java @@ -40,65 +40,29 @@ /** * An immutable view of the registry that holds all registered I/O instances. - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface Registry extends Describable { - /** - *

    exists.

    - * - * @param id a {@link java.lang.String} object. - * @return a boolean. - */ boolean exists(String id); /** - *

    exists.

    - * - * @param ioType a {@link com.pi4j.io.IOType} object. * @param identifier an int. Depending on the type of device: bcm (GPIO), identifier (I2C), channel (PWM and SPI) - * @return a boolean. */ boolean exists(IOType ioType, int identifier); - /** - *

    all.

    - * - * @return a {@link java.util.Map} object. - */ Map all(); /** - *

    get.

    - * - * @param id a {@link java.lang.String} object. - * @param a T object. - * @return a T object. * @throws com.pi4j.io.exception.IOInvalidIDException if any. * @throws com.pi4j.io.exception.IONotFoundException if any. */ T get(String id) throws IOInvalidIDException, IONotFoundException; /** - *

    get.

    - * - * @param id a {@link java.lang.String} object. - * @param type a {@link java.lang.Class} object. - * @param a T object. - * @return a T object. * @throws com.pi4j.io.exception.IOInvalidIDException if any. * @throws com.pi4j.io.exception.IONotFoundException if any. */ T get(String id, Class type) throws IOInvalidIDException, IONotFoundException; - /** - *

    allByType.

    - * - * @param ioClass a {@link java.lang.Class} object. - * @param a T object. - * @return a {@link java.util.Map} object. - */ default Map allByType(Class ioClass) { // create a map of I/O instances that extend of the given IO class var result = new ConcurrentHashMap(); @@ -108,35 +72,14 @@ default Map allByType(Class ioClass) { return Collections.unmodifiableMap(result); } - /** - *

    allByIoType.

    - * - * @param ioType a {@link com.pi4j.io.IOType} object. - * @param

    a P object. - * @return a {@link java.util.Map} object. - */ default

    Map allByIoType(IOType ioType) { return allByType(ioType.getIOClass()); } - /** - *

    allByProvider.

    - * - * @param providerClass a {@link java.lang.Class} object. - * @param

    a P object. - * @return a {@link java.util.Map} object. - */ default

    Map allByProvider(Class

    providerClass) { return allByIoType(IOType.getByProviderClass(providerClass)); } - /** - *

    allByProvider.

    - * - * @param providerId a {@link java.lang.String} object. - * @param

    a P object. - * @return a {@link java.util.Map} object. - */ default

    Map allByProvider(String providerId) { // create a map of providers that extend of the given io class @@ -147,15 +90,6 @@ default Map allByType(Class ioClass) { return Collections.unmodifiableMap(result); } - /** - *

    allByProvider.

    - * - * @param providerId a {@link java.lang.String} object. - * @param ioClass a {@link java.lang.Class} object. - * @param

    a P object. - * @param a T object. - * @return a {@link java.util.Map} object. - */ default

    Map allByProvider(String providerId, Class ioClass) { // create a map of providers that extend of the given io class var result = new ConcurrentHashMap(); @@ -167,11 +101,6 @@ default

    Map allByProvider(String p return Collections.unmodifiableMap(result); } - /** - *

    describe.

    - * - * @return a {@link com.pi4j.common.Descriptor} object. - */ default Descriptor describe() { Map instances = all(); diff --git a/pi4j-core/src/main/java/com/pi4j/util/Console.java b/pi4j-core/src/main/java/com/pi4j/util/Console.java index c21abe35..03cf61a8 100644 --- a/pi4j-core/src/main/java/com/pi4j/util/Console.java +++ b/pi4j-core/src/main/java/com/pi4j/util/Console.java @@ -28,12 +28,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -/** - *

    Console class.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id - */ public class Console { private static final Logger logger = LoggerFactory.getLogger(Console.class); @@ -51,107 +45,46 @@ public class Console { protected boolean exiting = false; - /** - *

    println.

    - * - * @param format a {@link java.lang.String} object. - * @param args a {@link java.lang.Object} object. - * @return a {@link com.pi4j.util.Console} object. - */ public synchronized Console println(String format, Object ... args){ return println(String.format(format, args)); } - /** - *

    print.

    - * - * @param format a {@link java.lang.String} object. - * @param args a {@link java.lang.Object} object. - * @return a {@link com.pi4j.util.Console} object. - */ public synchronized Console print(String format, Object ... args){ return print(String.format(format, args)); } - /** - *

    println.

    - * - * @param line a {@link java.lang.String} object. - * @return a {@link com.pi4j.util.Console} object. - */ public synchronized Console println(String line){ logger.info(line); return this; } - /** - *

    println.

    - * - * @param line a {@link java.lang.Object} object. - * @return a {@link com.pi4j.util.Console} object. - */ public synchronized Console println(Object line){ logger.info(line.toString()); return this; } - /** - *

    println.

    - * - * @return a {@link com.pi4j.util.Console} object. - */ public synchronized Console println(){ return println(""); } - /** - *

    print.

    - * - * @param data a {@link java.lang.Object} object. - * @return a {@link com.pi4j.util.Console} object. - */ public synchronized Console print(Object data){ logger.info(data.toString()); return this; } - /** - *

    print.

    - * - * @param data a {@link java.lang.String} object. - * @return a {@link com.pi4j.util.Console} object. - */ public synchronized Console print(String data){ logger.info(data); return this; } - /** - *

    println.

    - * - * @param character a char. - * @param repeat a int. - * @return a {@link com.pi4j.util.Console} object. - */ public synchronized Console println(char character, int repeat){ return println(StringUtil.repeat(character, repeat)); } - /** - *

    emptyLine.

    - * - * @return a {@link com.pi4j.util.Console} object. - */ public synchronized Console emptyLine(){ return emptyLine(1); } - /** - *

    emptyLine.

    - * - * @param number a int. - * @return a {@link com.pi4j.util.Console} object. - */ public synchronized Console emptyLine(int number){ for(var index = 0; index < number; index++){ println(); @@ -159,42 +92,18 @@ public synchronized Console emptyLine(int number){ return this; } - /** - *

    separatorLine.

    - * - * @return a {@link com.pi4j.util.Console} object. - */ public synchronized Console separatorLine(){ return println(LINE_SEPARATOR); } - /** - *

    separatorLine.

    - * - * @param character a char. - * @return a {@link com.pi4j.util.Console} object. - */ public synchronized Console separatorLine(char character){ return separatorLine(character, LINE_WIDTH); } - /** - *

    separatorLine.

    - * - * @param character a char. - * @param length a int. - * @return a {@link com.pi4j.util.Console} object. - */ public synchronized Console separatorLine(char character, int length){ return println(StringUtil.repeat(character, length)); } - /** - *

    title.

    - * - * @param title a {@link java.lang.String} object. - * @return a {@link com.pi4j.util.Console} object. - */ public synchronized Console title(String ... title){ clearScreen().separatorLine().separatorLine().emptyLine(); for(var s : title) { @@ -204,23 +113,10 @@ public synchronized Console title(String ... title){ return this; } - /** - *

    box.

    - * - * @param lines a {@link java.lang.String} object. - * @return a {@link com.pi4j.util.Console} object. - */ public synchronized Console box(String ... lines) { return box(2, lines); } - /** - *

    box.

    - * - * @param padding a int. - * @param lines a {@link java.lang.String} object. - * @return a {@link com.pi4j.util.Console} object. - */ public synchronized Console box(int padding, String ... lines) { int max_length = 0; for(var l : lines) { @@ -238,11 +134,6 @@ public synchronized Console box(int padding, String ... lines) { return this; } - /** - *

    goodbye.

    - * - * @return a {@link com.pi4j.util.Console} object. - */ public synchronized Console goodbye() { emptyLine(); separatorLine(); @@ -252,29 +143,14 @@ public synchronized Console goodbye() { return this; } - /** - *

    clearScreen.

    - * - * @return a {@link com.pi4j.util.Console} object. - */ public synchronized Console clearScreen(){ return print(CLEAR_SCREEN_ESCAPE_SEQUENCE); } - /** - *

    eraseLine.

    - * - * @return a {@link com.pi4j.util.Console} object. - */ public synchronized Console eraseLine(){ return print(ERASE_LINE_ESCAPE_SEQUENCE); } - /** - *

    promptForExit.

    - * - * @return a {@link com.pi4j.util.Console} object. - */ public synchronized Console promptForExit(){ box(4, "PRESS CTRL-C TO EXIT"); emptyLine(); @@ -290,8 +166,6 @@ public void run() { } /** - *

    waitForExit.

    - * * @throws java.lang.InterruptedException if any. */ public void waitForExit() throws InterruptedException { @@ -300,19 +174,9 @@ public void waitForExit() throws InterruptedException { } } - /** - *

    exiting.

    - * - * @return a boolean. - */ public synchronized boolean exiting(){ return exiting; } - /** - *

    isRunning.

    - * - * @return a boolean. - */ public synchronized boolean isRunning(){ return !exiting; } diff --git a/pi4j-core/src/main/java/com/pi4j/util/DecimalFormatter.java b/pi4j-core/src/main/java/com/pi4j/util/DecimalFormatter.java index 5967b496..b5b42400 100644 --- a/pi4j-core/src/main/java/com/pi4j/util/DecimalFormatter.java +++ b/pi4j-core/src/main/java/com/pi4j/util/DecimalFormatter.java @@ -28,12 +28,6 @@ import java.text.DecimalFormat; import java.text.DecimalFormatSymbols; -/** - *

    DecimalFormatter class.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id - */ public class DecimalFormatter { /** Constant otherSymbols */ @@ -41,12 +35,6 @@ public class DecimalFormatter { /** Constant df */ protected static DecimalFormat df = new DecimalFormat("#.##################", otherSymbols); - /** - *

    format.

    - * - * @param value a {@link java.lang.Number} object. - * @return a {@link java.lang.String} object. - */ public static String format(Number value){ return df.format(value); } diff --git a/pi4j-core/src/main/java/com/pi4j/util/Frequency.java b/pi4j-core/src/main/java/com/pi4j/util/Frequency.java index dd3bf183..946df1b0 100644 --- a/pi4j-core/src/main/java/com/pi4j/util/Frequency.java +++ b/pi4j-core/src/main/java/com/pi4j/util/Frequency.java @@ -26,12 +26,6 @@ */ -/** - *

    Frequency class.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id - */ public class Frequency { public static final long MEGAHERTZ = 1000000; @@ -40,6 +34,7 @@ public class Frequency { /** * Convert Kilohertz to Hertz + * * @param frequency number of kilohertz * @return total number of hertz */ @@ -49,6 +44,7 @@ public static int kilohertz(Number frequency){ /** * Convert Megahertz to Hertz + * * @param frequency number of megahertz * @return total number of hertz */ @@ -59,6 +55,7 @@ public static int megahertz(Number frequency){ /** * Convert Frequency (in Hertz) to Nanoseconds + * * @param frequency value in hertz * @return total number of nanoseconds represented by this frequency value */ @@ -70,6 +67,7 @@ public static long nanoseconds(Number frequency){ /** * Convert Frequency (in Hertz) to Microseconds + * * @param frequency value in hertz * @return total number of microseconds represented by this frequency value */ @@ -81,6 +79,7 @@ public static long microseconds(Number frequency){ /** * Convert Frequency (in Hertz) to Milliseconds + * * @param frequency value in hertz * @return total number of milliseconds represented by this frequency value */ @@ -92,6 +91,7 @@ public static float milliseconds(Number frequency){ /** * Get Frequency (in Hertz) from Nanoseconds + * * @param nanoseconds value in hertz * @return total number of nanoseconds represented by this frequency value */ diff --git a/pi4j-core/src/main/java/com/pi4j/util/ReflectionUtil.java b/pi4j-core/src/main/java/com/pi4j/util/ReflectionUtil.java index 2102b4f5..c27d169c 100644 --- a/pi4j-core/src/main/java/com/pi4j/util/ReflectionUtil.java +++ b/pi4j-core/src/main/java/com/pi4j/util/ReflectionUtil.java @@ -31,18 +31,11 @@ import java.util.Set; import java.util.stream.Collectors; -/** - *

    ReflectionUtil class.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id - */ public class ReflectionUtil { /** *

    getAllInterfacesSorted. Interfaces are sorted by full qualified class name.

    * - * @param target a {@link java.lang.Object} object. * @return a sorted {@link java.util.Collection} object. */ public static Collection getAllInterfacesSorted(Object target){ @@ -52,22 +45,10 @@ public static Collection getAllInterfacesSorted(Object target){ .collect(Collectors.toList()); } - /** - *

    getAllInterfaces.

    - * - * @param target a {@link java.lang.Object} object. - * @return a {@link java.util.Collection} object. - */ public static Collection getAllInterfaces(Object target){ return getAllInterfaces(target.getClass()); } - /** - *

    getAllInterfaces.

    - * - * @param targetClass a {@link java.lang.Class} object. - * @return a {@link java.util.Collection} object. - */ public static Collection getAllInterfaces(Class targetClass){ Set results = new HashSet<>(); @@ -91,23 +72,11 @@ public static Collection getAllInterfaces(Class targetClass){ return results; } - /** - *

    getAllClasses.

    - * - * @param target a {@link java.lang.Object} object. - * @return a {@link java.util.Collection} object. - */ public static Collection getAllClasses(Object target){ Set results = new HashSet<>(); return getAllClasses(target.getClass()); } - /** - *

    getAllClasses.

    - * - * @param targetClass a {@link java.lang.Class} object. - * @return a {@link java.util.Collection} object. - */ public static Collection getAllClasses(Class targetClass){ Set results = new HashSet<>(); diff --git a/pi4j-core/src/main/java/com/pi4j/util/StringUtil.java b/pi4j-core/src/main/java/com/pi4j/util/StringUtil.java index dc12a580..6fad173a 100644 --- a/pi4j-core/src/main/java/com/pi4j/util/StringUtil.java +++ b/pi4j-core/src/main/java/com/pi4j/util/StringUtil.java @@ -31,12 +31,6 @@ import java.nio.charset.StandardCharsets; import java.util.Arrays; -/** - *

    StringUtil class.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id - */ public class StringUtil { /** @@ -48,13 +42,6 @@ public class StringUtil { */ public static final char DEFAULT_PAD_CHAR = ' '; - /** - *

    isNullOrEmpty.

    - * - * @param data a {@link java.lang.String} object. - * @param trim a boolean. - * @return a boolean. - */ public static boolean isNullOrEmpty(String data, boolean trim) { if (data == null) return true; @@ -67,45 +54,18 @@ public static boolean isNullOrEmpty(String data, boolean trim) { return (test.length() <= 0); } - /** - *

    isNullOrEmpty.

    - * - * @param data a {@link java.lang.String} object. - * @return a boolean. - */ public static boolean isNullOrEmpty(String data) { return isNullOrEmpty(data, false); } - /** - *

    isNotNullOrEmpty.

    - * - * @param data a {@link java.lang.String} object. - * @return a boolean. - */ public static boolean isNotNullOrEmpty(String data) { return isNotNullOrEmpty(data, false); } - /** - *

    isNotNullOrEmpty.

    - * - * @param data a {@link java.lang.String} object. - * @param trim a boolean. - * @return a boolean. - */ public static boolean isNotNullOrEmpty(String data, boolean trim) { return !(isNullOrEmpty(data, trim)); } - /** - *

    setIfNullOrEmpty.

    - * - * @param data a {@link java.lang.String} object. - * @param replacement a {@link java.lang.String} object. - * @param trim a boolean. - * @return a {@link java.lang.String} object. - */ public static String setIfNullOrEmpty(String data, String replacement, boolean trim) { if (isNullOrEmpty(data, trim)) { return replacement; @@ -113,34 +73,16 @@ public static String setIfNullOrEmpty(String data, String replacement, boolean t return data; } - /** - *

    setIfNullOrEmpty.

    - * - * @param data a {@link java.lang.String} object. - * @param replacement a {@link java.lang.String} object. - * @return a {@link java.lang.String} object. - */ public static String setIfNullOrEmpty(String data, String replacement) { return setIfNullOrEmpty(data, replacement, false); } - /** - *

    contains.

    - * - * @param source a {@link java.lang.String} object. - * @param target a {@link java.lang.String} object. - * @return a boolean. - */ public static boolean contains(String source, String target) { return (null != source && null != target && source.contains(target)); } /** - *

    contains.

    - * - * @param source a {@link java.lang.String} object. * @param targets an array of {@link java.lang.String} objects. - * @return a boolean. */ public static boolean contains(String source, String[] targets) { if (null != source && null != targets) { @@ -154,11 +96,7 @@ public static boolean contains(String source, String[] targets) { } /** - *

    contains.

    - * * @param sources an array of {@link java.lang.String} objects. - * @param target a {@link java.lang.String} object. - * @return a boolean. */ public static boolean contains(String[] sources, String target) { if (null != sources && null != target) { @@ -171,11 +109,8 @@ public static boolean contains(String[] sources, String target) { } /** - *

    contains.

    - * * @param sources an array of {@link java.lang.String} objects. * @param targets an array of {@link java.lang.String} objects. - * @return a boolean. */ public static boolean contains(String[] sources, String[] targets) { if (null != sources && null != targets) { @@ -187,23 +122,10 @@ public static boolean contains(String[] sources, String[] targets) { return false; } - /** - *

    create.

    - * - * @param length a int. - * @return a {@link java.lang.String} object. - */ public static String create(int length) { return create(DEFAULT_PAD_CHAR, length); } - /** - *

    create.

    - * - * @param c a char. - * @param length a int. - * @return a {@link java.lang.String} object. - */ public static String create(char c, int length) { StringBuilder sb = new StringBuilder(length); for (var index = 0; index < length; index++) @@ -211,13 +133,6 @@ public static String create(char c, int length) { return sb.toString(); } - /** - *

    create.

    - * - * @param s a {@link java.lang.String} object. - * @param length a int. - * @return a {@link java.lang.String} object. - */ public static String create(String s, int length) { StringBuilder sb = new StringBuilder(length * s.length()); for (var index = 0; index < length; index++) @@ -225,47 +140,18 @@ public static String create(String s, int length) { return sb.toString(); } - /** - *

    repeat.

    - * - * @param c a char. - * @param length a int. - * @return a {@link java.lang.String} object. - */ public static String repeat(char c, int length) { return create(c, length); } - /** - *

    repeat.

    - * - * @param s a {@link java.lang.String} object. - * @param length a int. - * @return a {@link java.lang.String} object. - */ public static String repeat(String s, int length) { return create(s, length); } - /** - *

    padLeft.

    - * - * @param data a {@link java.lang.String} object. - * @param length a int. - * @return a {@link java.lang.String} object. - */ public static String padLeft(String data, int length) { return padLeft(data, DEFAULT_PAD_CHAR, length); } - /** - *

    padLeft.

    - * - * @param data a {@link java.lang.String} object. - * @param pad a char. - * @param length a int. - * @return a {@link java.lang.String} object. - */ public static String padLeft(String data, char pad, int length) { var sb = new StringBuilder(data.length() + length); for (var index = 0; index < length; index++) @@ -274,14 +160,6 @@ public static String padLeft(String data, char pad, int length) { return sb.toString(); } - /** - *

    padLeft.

    - * - * @param data a {@link java.lang.String} object. - * @param pad a {@link java.lang.String} object. - * @param length a int. - * @return a {@link java.lang.String} object. - */ public static String padLeft(String data, String pad, int length) { var sb = new StringBuilder(data.length() + (length * pad.length())); for (var index = 0; index < length; index++) @@ -290,25 +168,10 @@ public static String padLeft(String data, String pad, int length) { return sb.toString(); } - /** - *

    padRight.

    - * - * @param data a {@link java.lang.String} object. - * @param length a int. - * @return a {@link java.lang.String} object. - */ public static String padRight(String data, int length) { return padRight(data, DEFAULT_PAD_CHAR, length); } - /** - *

    padRight.

    - * - * @param data a {@link java.lang.String} object. - * @param pad a char. - * @param length a int. - * @return a {@link java.lang.String} object. - */ public static String padRight(String data, char pad, int length) { var sb = new StringBuilder(data.length() + length); sb.append(data); @@ -317,14 +180,6 @@ public static String padRight(String data, char pad, int length) { return sb.toString(); } - /** - *

    padRight.

    - * - * @param data a {@link java.lang.String} object. - * @param pad a {@link java.lang.String} object. - * @param length a int. - * @return a {@link java.lang.String} object. - */ public static String padRight(String data, String pad, int length) { var sb = new StringBuilder(data.length() + (length * pad.length())); sb.append(data); @@ -333,60 +188,22 @@ public static String padRight(String data, String pad, int length) { return sb.toString(); } - /** - *

    pad.

    - * - * @param data a {@link java.lang.String} object. - * @param length a int. - * @return a {@link java.lang.String} object. - */ public static String pad(String data, int length) { return pad(data, DEFAULT_PAD_CHAR, length); } - /** - *

    pad.

    - * - * @param data a {@link java.lang.String} object. - * @param pad a char. - * @param length a int. - * @return a {@link java.lang.String} object. - */ public static String pad(String data, char pad, int length) { return create(pad, length) + data + create(pad, length); } - /** - *

    pad.

    - * - * @param data a {@link java.lang.String} object. - * @param pad a {@link java.lang.String} object. - * @param length a int. - * @return a {@link java.lang.String} object. - */ public static String pad(String data, String pad, int length) { return create(pad, length) + data + create(pad, length); } - /** - *

    padCenter.

    - * - * @param data a {@link java.lang.String} object. - * @param length a int. - * @return a {@link java.lang.String} object. - */ public static String padCenter(String data, int length) { return padCenter(data, DEFAULT_PAD_CHAR, length); } - /** - *

    padCenter.

    - * - * @param data a {@link java.lang.String} object. - * @param pad a char. - * @param length a int. - * @return a {@link java.lang.String} object. - */ public static String padCenter(String data, char pad, int length) { if (data.length() < length) { int needed = length - data.length(); @@ -402,23 +219,10 @@ public static String padCenter(String data, char pad, int length) { return data; } - /** - *

    trimLeft.

    - * - * @param data a {@link java.lang.String} object. - * @return a {@link java.lang.String} object. - */ public static String trimLeft(String data) { return trimLeft(data, DEFAULT_PAD_CHAR); } - /** - *

    trimLeft.

    - * - * @param data a {@link java.lang.String} object. - * @param trim a char. - * @return a {@link java.lang.String} object. - */ public static String trimLeft(String data, char trim) { for (var index = 0; index < data.length(); index++) if (!(data.charAt(index) == trim)) @@ -426,23 +230,10 @@ public static String trimLeft(String data, char trim) { return EMPTY; } - /** - *

    trimRight.

    - * - * @param data a {@link java.lang.String} object. - * @return a {@link java.lang.String} object. - */ public static String trimRight(String data) { return trimRight(data, DEFAULT_PAD_CHAR); } - /** - *

    trimRight.

    - * - * @param data a {@link java.lang.String} object. - * @param trim a char. - * @return a {@link java.lang.String} object. - */ public static String trimRight(String data, char trim) { int count = 0; for (var index = data.length(); index > 0; index--) @@ -453,35 +244,15 @@ public static String trimRight(String data, char trim) { return EMPTY; } - /** - *

    trim.

    - * - * @param data a {@link java.lang.String} object. - * @return a {@link java.lang.String} object. - */ public static String trim(String data) { return trim(data, DEFAULT_PAD_CHAR); } - /** - *

    trim.

    - * - * @param data a {@link java.lang.String} object. - * @param trim a char. - * @return a {@link java.lang.String} object. - */ public static String trim(String data, char trim) { var result = trimLeft(data, trim); return trimRight(result, trim); } - /** - *

    center.

    - * - * @param text a {@link java.lang.String} object. - * @param length a int. - * @return a {@link java.lang.String} object. - */ public static String center(String text, int length) { var out = String.format("%" + length + "s%s%" + length + "s", "", text, ""); var mid = (out.length() / 2); @@ -490,12 +261,6 @@ public static String center(String text, int length) { return out.substring((int) start, (int) end); } - /** - *

    concat.

    - * - * @param data a {@link java.lang.String} object. - * @return a {@link java.lang.String} object. - */ public static String concat(String... data) { var sb = new StringBuilder(); for (var d : data) { @@ -504,50 +269,23 @@ public static String concat(String... data) { return sb.toString(); } - /** - *

    appendHexString.

    - * - * @param builder a {@link java.lang.StringBuilder} object. - * @param byt a byte. - */ public static void appendHexString(StringBuilder builder, byte byt) { builder.append(String.format("%02X", byt)); } - /** - *

    toHexString.

    - * - * @param byt a byte. - * @return a {@link java.lang.String} object. - */ public static String toHexString(byte byt) { return String.format("%02X", byt); } - /** - *

    appendHexString.

    - * - * @param builder a {@link java.lang.StringBuilder} object. - * @param byt a int. - */ public static void appendHexString(StringBuilder builder, int byt) { builder.append(String.format("%02X", (byte) byt)); } - /** - *

    toHexString.

    - * - * @param byt a int. - * @return a {@link java.lang.String} object. - */ public static String toHexString(int byt) { return String.format("%02X", (byte) byt); } /** - *

    appendHexString.

    - * - * @param builder a {@link java.lang.StringBuilder} object. * @param bytes an array of byte values. */ public static void appendHexString(StringBuilder builder, byte[] bytes) { @@ -556,34 +294,18 @@ public static void appendHexString(StringBuilder builder, byte[] bytes) { } } - /** - *

    toHexString.

    - * - * @param data a {@link java.lang.CharSequence} object. - * @return a {@link java.lang.String} object. - */ public static String toHexString(CharSequence data) { StringBuilder sb = new StringBuilder(); appendHexString(sb, data); return sb.toString().trim(); } - /** - *

    appendHexString.

    - * - * @param builder a {@link java.lang.StringBuilder} object. - * @param data a {@link java.lang.CharSequence} object. - */ public static void appendHexString(StringBuilder builder, CharSequence data) { appendHexString(builder, data.toString().getBytes(StandardCharsets.US_ASCII)); } /** - *

    toHexString.

    - * - * @param data a {@link java.lang.CharSequence} object. * @param charset character set used to decode string to bytes - * @return a {@link java.lang.String} object. */ public static String toHexString(CharSequence data, Charset charset) { StringBuilder sb = new StringBuilder(); @@ -592,10 +314,6 @@ public static String toHexString(CharSequence data, Charset charset) { } /** - *

    appendHexString.

    - * - * @param builder a {@link java.lang.StringBuilder} object. - * @param data a {@link java.lang.CharSequence} object. * @param charset character set used to decode string to bytes */ public static void appendHexString(StringBuilder builder, CharSequence data, Charset charset) { @@ -603,10 +321,7 @@ public static void appendHexString(StringBuilder builder, CharSequence data, Cha } /** - *

    toHexString.

    - * * @param bytes an array of byte values. - * @return a {@link java.lang.String} object. */ public static String toHexString(byte[] bytes) { StringBuilder sb = new StringBuilder(); @@ -614,22 +329,10 @@ public static String toHexString(byte[] bytes) { return sb.toString().trim(); } - /** - *

    appendHexString.

    - * - * @param builder a {@link java.lang.StringBuilder} object. - * @param buffer a {@link java.nio.ByteBuffer} object. - */ public static void appendHexString(StringBuilder builder, ByteBuffer buffer) { appendHexString(builder, buffer.array()); } - /** - *

    toHexString.

    - * - * @param buffer a {@link java.nio.ByteBuffer} object. - * @return a {@link java.lang.String} object. - */ public static String toHexString(ByteBuffer buffer) { StringBuilder sb = new StringBuilder(); appendHexString(sb, buffer); @@ -637,24 +340,14 @@ public static String toHexString(ByteBuffer buffer) { } /** - *

    appendHexString.

    - * - * @param builder a {@link java.lang.StringBuilder} object. * @param bytes an array of byte values. - * @param offset a int. - * @param length a int. */ public static void appendHexString(StringBuilder builder, byte[] bytes, int offset, int length) { appendHexString(builder, Arrays.copyOfRange(bytes, offset, offset + length)); } /** - *

    toHexString.

    - * * @param bytes an array of byte values. - * @param offset a int. - * @param length a int. - * @return a {@link java.lang.String} object. */ public static String toHexString(byte[] bytes, int offset, int length) { StringBuilder sb = new StringBuilder(); @@ -662,38 +355,16 @@ public static String toHexString(byte[] bytes, int offset, int length) { return sb.toString().trim(); } - /** - *

    appendHexString.

    - * - * @param builder a {@link java.lang.StringBuilder} object. - * @param buffer a {@link java.nio.ByteBuffer} object. - * @param offset a int. - * @param length a int. - */ public static void appendHexString(StringBuilder builder, ByteBuffer buffer, int offset, int length) { appendHexString(builder, buffer.array(), offset, length); } - /** - *

    toHexString.

    - * - * @param buffer a {@link java.nio.ByteBuffer} object. - * @param offset a int. - * @param length a int. - * @return a {@link java.lang.String} object. - */ public static String toHexString(ByteBuffer buffer, int offset, int length) { StringBuilder sb = new StringBuilder(); appendHexString(sb, buffer, offset, length); return sb.toString().trim(); } - /** - *

    isNumeric.

    - * - * @param str a {@link java.lang.String} object. - * @return a boolean. - */ public static boolean isNumeric(String str) { try { Double.parseDouble(str); @@ -703,13 +374,6 @@ public static boolean isNumeric(String str) { } } - /** - *

    parseInteger.

    - * - * @param str a {@link java.lang.String} object. - * @param defaultValue a {@link java.lang.Integer} object. - * @return a int. - */ public static int parseInteger(String str, Integer defaultValue) { try { Integer v = Integer.parseInt(str); @@ -719,13 +383,6 @@ public static int parseInteger(String str, Integer defaultValue) { } } - /** - *

    parseLong.

    - * - * @param str a {@link java.lang.String} object. - * @param defaultValue a {@link java.lang.Long} object. - * @return a int. - */ public static long parseLong(String str, Long defaultValue) { try { Long v = Long.parseLong(str); diff --git a/pi4j-test/src/main/java/com/pi4j/test/About.java b/pi4j-test/src/main/java/com/pi4j/test/About.java index 9ea3d7e7..798aadd1 100644 --- a/pi4j-test/src/main/java/com/pi4j/test/About.java +++ b/pi4j-test/src/main/java/com/pi4j/test/About.java @@ -31,12 +31,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -/** - *

    About class.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id - */ public class About { private static final Logger logger = LoggerFactory.getLogger(About.class); diff --git a/pi4j-test/src/main/java/com/pi4j/test/Main.java b/pi4j-test/src/main/java/com/pi4j/test/Main.java index ee9dfeb1..591a50b9 100644 --- a/pi4j-test/src/main/java/com/pi4j/test/Main.java +++ b/pi4j-test/src/main/java/com/pi4j/test/Main.java @@ -33,9 +33,7 @@ import java.util.List; /** - *

    Main class.

    * Simple test of the six providers. Dependent upon the wiring described in the README file. - * */ public class Main { diff --git a/pi4j-test/src/main/java/com/pi4j/test/provider/TestDigitalInput.java b/pi4j-test/src/main/java/com/pi4j/test/provider/TestDigitalInput.java index 499e650b..f07513ba 100644 --- a/pi4j-test/src/main/java/com/pi4j/test/provider/TestDigitalInput.java +++ b/pi4j-test/src/main/java/com/pi4j/test/provider/TestDigitalInput.java @@ -27,38 +27,19 @@ import com.pi4j.io.gpio.digital.*; -/** - *

    TestDigitalInput class.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id - */ public class TestDigitalInput extends DigitalInputBase implements DigitalInput { private DigitalState state = DigitalState.UNKNOWN; - /** {@inheritDoc} */ @Override public DigitalState state() { return this.state; } - /** - *

    Constructor for TestDigitalInput.

    - * - * @param provider a {@link com.pi4j.io.gpio.digital.DigitalInputProvider} object. - * @param config a {@link com.pi4j.io.gpio.digital.DigitalInputConfig} object. - */ public TestDigitalInput(DigitalInputProvider provider, DigitalInputConfig config){ super(provider, config); } - /** - *

    test.

    - * - * @param state a {@link com.pi4j.io.gpio.digital.DigitalState} object. - * @return a {@link com.pi4j.test.provider.TestDigitalInput} object. - */ public TestDigitalInput test(DigitalState state){ // check to see of there is a state change; if there is then we need diff --git a/pi4j-test/src/main/java/com/pi4j/test/provider/TestDigitalInputProvider.java b/pi4j-test/src/main/java/com/pi4j/test/provider/TestDigitalInputProvider.java index eb18125b..25497ad6 100644 --- a/pi4j-test/src/main/java/com/pi4j/test/provider/TestDigitalInputProvider.java +++ b/pi4j-test/src/main/java/com/pi4j/test/provider/TestDigitalInputProvider.java @@ -31,45 +31,18 @@ /** *

    TestDigitalInputProvider interface.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface TestDigitalInputProvider extends DigitalInputProvider { - /** - *

    newInstance.

    - * - * @return a {@link com.pi4j.test.provider.TestDigitalInputProvider} object. - */ static TestDigitalInputProvider newInstance(){ return new TestDigitalInputProviderImpl(); } - /** - *

    newInstance.

    - * - * @param id a {@link java.lang.String} object. - * @return a {@link com.pi4j.test.provider.TestDigitalInputProvider} object. - */ static TestDigitalInputProvider newInstance(String id){ return new TestDigitalInputProviderImpl(id); } - /** - *

    newInstance.

    - * - * @param id a {@link java.lang.String} object. - * @param name a {@link java.lang.String} object. - * @return a {@link com.pi4j.test.provider.TestDigitalInputProvider} object. - */ static TestDigitalInputProvider newInstance(String id, String name){ return new TestDigitalInputProviderImpl(id, name); } - /** - *

    create.

    - * - * @param a T object. - * @return a T object. - */ default T create() { return create(0); } diff --git a/pi4j-test/src/main/java/com/pi4j/test/provider/TestI2CProvider.java b/pi4j-test/src/main/java/com/pi4j/test/provider/TestI2CProvider.java index c01d7227..fb397ac6 100644 --- a/pi4j-test/src/main/java/com/pi4j/test/provider/TestI2CProvider.java +++ b/pi4j-test/src/main/java/com/pi4j/test/provider/TestI2CProvider.java @@ -30,35 +30,14 @@ /** *

    TestI2CProvider interface.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface TestI2CProvider extends I2CProvider { - /** - *

    newInstance.

    - * - * @return a {@link com.pi4j.test.provider.TestI2CProvider} object. - */ static TestI2CProvider newInstance(){ return new TestI2CProviderImpl(); } - /** - *

    newInstance.

    - * - * @param id a {@link java.lang.String} object. - * @return a {@link com.pi4j.test.provider.TestI2CProvider} object. - */ static TestI2CProvider newInstance(String id){ return new TestI2CProviderImpl(id); } - /** - *

    newInstance.

    - * - * @param id a {@link java.lang.String} object. - * @param name a {@link java.lang.String} object. - * @return a {@link com.pi4j.test.provider.TestI2CProvider} object. - */ static TestI2CProvider newInstance(String id, String name){ return new TestI2CProviderImpl(id, name); } diff --git a/pi4j-test/src/main/java/com/pi4j/test/provider/TestPwmProvider.java b/pi4j-test/src/main/java/com/pi4j/test/provider/TestPwmProvider.java index 5c9fcffc..eea466e6 100644 --- a/pi4j-test/src/main/java/com/pi4j/test/provider/TestPwmProvider.java +++ b/pi4j-test/src/main/java/com/pi4j/test/provider/TestPwmProvider.java @@ -30,35 +30,14 @@ /** *

    TestPwmProvider interface.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface TestPwmProvider extends PwmProvider { - /** - *

    newInstance.

    - * - * @return a {@link com.pi4j.test.provider.TestPwmProvider} object. - */ static TestPwmProvider newInstance(){ return new TestPwmProviderImpl(); } - /** - *

    newInstance.

    - * - * @param id a {@link java.lang.String} object. - * @return a {@link com.pi4j.test.provider.TestPwmProvider} object. - */ static TestPwmProvider newInstance(String id){ return new TestPwmProviderImpl(id); } - /** - *

    newInstance.

    - * - * @param id a {@link java.lang.String} object. - * @param name a {@link java.lang.String} object. - * @return a {@link com.pi4j.test.provider.TestPwmProvider} object. - */ static TestPwmProvider newInstance(String id, String name){ return new TestPwmProviderImpl(id, name); } diff --git a/pi4j-test/src/main/java/com/pi4j/test/provider/TestSpiProvider.java b/pi4j-test/src/main/java/com/pi4j/test/provider/TestSpiProvider.java index 61bb2378..a556589e 100644 --- a/pi4j-test/src/main/java/com/pi4j/test/provider/TestSpiProvider.java +++ b/pi4j-test/src/main/java/com/pi4j/test/provider/TestSpiProvider.java @@ -30,35 +30,14 @@ /** *

    TestSpiProvider interface.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface TestSpiProvider extends SpiProvider { - /** - *

    newInstance.

    - * - * @return a {@link com.pi4j.test.provider.TestSpiProvider} object. - */ static TestSpiProvider newInstance(){ return new TestSpiProviderImpl(); } - /** - *

    newInstance.

    - * - * @param id a {@link java.lang.String} object. - * @return a {@link com.pi4j.test.provider.TestSpiProvider} object. - */ static TestSpiProvider newInstance(String id){ return new TestSpiProviderImpl(id); } - /** - *

    newInstance.

    - * - * @param id a {@link java.lang.String} object. - * @param name a {@link java.lang.String} object. - * @return a {@link com.pi4j.test.provider.TestSpiProvider} object. - */ static TestSpiProvider newInstance(String id, String name){ return new TestSpiProviderImpl(id, name); } diff --git a/pi4j-test/src/main/java/com/pi4j/test/provider/impl/TestDigitalInputProviderImpl.java b/pi4j-test/src/main/java/com/pi4j/test/provider/impl/TestDigitalInputProviderImpl.java index 553a07ae..2dfb1c6f 100644 --- a/pi4j-test/src/main/java/com/pi4j/test/provider/impl/TestDigitalInputProviderImpl.java +++ b/pi4j-test/src/main/java/com/pi4j/test/provider/impl/TestDigitalInputProviderImpl.java @@ -32,43 +32,20 @@ import com.pi4j.test.provider.TestDigitalInput; import com.pi4j.test.provider.TestDigitalInputProvider; -/** - *

    TestDigitalInputProviderImpl class.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id - */ public class TestDigitalInputProviderImpl extends DigitalInputProviderBase implements TestDigitalInputProvider { - /** - *

    Constructor for TestDigitalInputProviderImpl.

    - */ public TestDigitalInputProviderImpl() { super(); } - /** - *

    Constructor for TestDigitalInputProviderImpl.

    - * - * @param id a {@link java.lang.String} object. - */ public TestDigitalInputProviderImpl(String id) { super(id); } - /** - *

    Constructor for TestDigitalInputProviderImpl.

    - * - * @param id a {@link java.lang.String} object. - * @param name a {@link java.lang.String} object. - */ public TestDigitalInputProviderImpl(String id, String name) { super(id, name); } - /** - * {@inheritDoc} - */ @Override public DigitalInput create(DigitalInputConfig config) { TestDigitalInput input = new TestDigitalInput(this, config); diff --git a/pi4j-test/src/main/java/com/pi4j/test/provider/impl/TestI2CProviderImpl.java b/pi4j-test/src/main/java/com/pi4j/test/provider/impl/TestI2CProviderImpl.java index daaf4fb5..0407d7be 100644 --- a/pi4j-test/src/main/java/com/pi4j/test/provider/impl/TestI2CProviderImpl.java +++ b/pi4j-test/src/main/java/com/pi4j/test/provider/impl/TestI2CProviderImpl.java @@ -30,39 +30,18 @@ import com.pi4j.io.i2c.I2CProviderBase; import com.pi4j.test.provider.TestI2CProvider; -/** - *

    TestI2CProviderImpl class.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id - */ public class TestI2CProviderImpl extends I2CProviderBase implements TestI2CProvider { - /** - *

    Constructor for TestI2CProviderImpl.

    - */ public TestI2CProviderImpl(){ super(); } - /** - *

    Constructor for TestI2CProviderImpl.

    - * - * @param id a {@link java.lang.String} object. - */ public TestI2CProviderImpl(String id){ super(id); } - /** - *

    Constructor for TestI2CProviderImpl.

    - * - * @param id a {@link java.lang.String} object. - * @param name a {@link java.lang.String} object. - */ public TestI2CProviderImpl(String id, String name){ super(id, name); } - /** {@inheritDoc} */ @Override public I2C create(I2CConfig config) { return null; diff --git a/pi4j-test/src/main/java/com/pi4j/test/provider/impl/TestPwmProviderImpl.java b/pi4j-test/src/main/java/com/pi4j/test/provider/impl/TestPwmProviderImpl.java index ed0b51ad..e6e31391 100644 --- a/pi4j-test/src/main/java/com/pi4j/test/provider/impl/TestPwmProviderImpl.java +++ b/pi4j-test/src/main/java/com/pi4j/test/provider/impl/TestPwmProviderImpl.java @@ -30,39 +30,18 @@ import com.pi4j.io.pwm.PwmProviderBase; import com.pi4j.test.provider.TestPwmProvider; -/** - *

    TestPwmProviderImpl class.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id - */ public class TestPwmProviderImpl extends PwmProviderBase implements TestPwmProvider { - /** - *

    Constructor for TestPwmProviderImpl.

    - */ public TestPwmProviderImpl(){ super(); } - /** - *

    Constructor for TestPwmProviderImpl.

    - * - * @param id a {@link java.lang.String} object. - */ public TestPwmProviderImpl(String id){ super(id); } - /** - *

    Constructor for TestPwmProviderImpl.

    - * - * @param id a {@link java.lang.String} object. - * @param name a {@link java.lang.String} object. - */ public TestPwmProviderImpl(String id, String name){ super(id, name); } - /** {@inheritDoc} */ @Override public Pwm create(PwmConfig config) { return null; diff --git a/pi4j-test/src/main/java/com/pi4j/test/provider/impl/TestSpiProviderImpl.java b/pi4j-test/src/main/java/com/pi4j/test/provider/impl/TestSpiProviderImpl.java index 4cf6f099..c2fd1260 100644 --- a/pi4j-test/src/main/java/com/pi4j/test/provider/impl/TestSpiProviderImpl.java +++ b/pi4j-test/src/main/java/com/pi4j/test/provider/impl/TestSpiProviderImpl.java @@ -30,39 +30,18 @@ import com.pi4j.io.spi.SpiProviderBase; import com.pi4j.test.provider.TestSpiProvider; -/** - *

    TestSpiProviderImpl class.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id - */ public class TestSpiProviderImpl extends SpiProviderBase implements TestSpiProvider { - /** - *

    Constructor for TestSpiProviderImpl.

    - */ public TestSpiProviderImpl(){ super(); } - /** - *

    Constructor for TestSpiProviderImpl.

    - * - * @param id a {@link java.lang.String} object. - */ public TestSpiProviderImpl(String id){ super(id); } - /** - *

    Constructor for TestSpiProviderImpl.

    - * - * @param id a {@link java.lang.String} object. - * @param name a {@link java.lang.String} object. - */ public TestSpiProviderImpl(String id, String name){ super(id, name); } - /** {@inheritDoc} */ @Override public Spi create(SpiConfig config) { return null; diff --git a/pi4j-test/src/main/java/com/pi4j/test/smoketest/ProviderContext.java b/pi4j-test/src/main/java/com/pi4j/test/smoketest/ProviderContext.java index 55ccc5d1..003aec0a 100644 --- a/pi4j-test/src/main/java/com/pi4j/test/smoketest/ProviderContext.java +++ b/pi4j-test/src/main/java/com/pi4j/test/smoketest/ProviderContext.java @@ -35,7 +35,6 @@ public static TestProvider getByName(String name) { private Context pi4j = null; /** - * * @param testProvider Identifies which set of providers to create */ public ProviderContext(TestProvider testProvider) { diff --git a/plugins/pi4j-plugin-ffm/src/main/java/com/pi4j/plugin/ffm/common/FileWatcher.java b/plugins/pi4j-plugin-ffm/src/main/java/com/pi4j/plugin/ffm/common/FileWatcher.java index 584686fc..858d38b9 100644 --- a/plugins/pi4j-plugin-ffm/src/main/java/com/pi4j/plugin/ffm/common/FileWatcher.java +++ b/plugins/pi4j-plugin-ffm/src/main/java/com/pi4j/plugin/ffm/common/FileWatcher.java @@ -35,6 +35,7 @@ public FileWatcher(Path directory, String fileToWatch, int timeoutMs) { /** * Checks, if file is created in the desired directory with timeout. + * * @return true if file is created and false if timeout occurred */ public boolean waitForCreation() { diff --git a/plugins/pi4j-plugin-ffm/src/main/java/com/pi4j/plugin/ffm/common/gpio/structs/LineValues.java b/plugins/pi4j-plugin-ffm/src/main/java/com/pi4j/plugin/ffm/common/gpio/structs/LineValues.java index d165394e..e8694dc1 100644 --- a/plugins/pi4j-plugin-ffm/src/main/java/com/pi4j/plugin/ffm/common/gpio/structs/LineValues.java +++ b/plugins/pi4j-plugin-ffm/src/main/java/com/pi4j/plugin/ffm/common/gpio/structs/LineValues.java @@ -13,6 +13,7 @@ * Source: include/uapi/linux/gpio.h:96:8 * * struct gpio_v2_line_values - Values of GPIO lines + * * @bits: a bitmap containing the value of the lines, set to 1 for active * and 0 for inactive. * @mask: a bitmap identifying the lines to get or set, with each bit diff --git a/plugins/pi4j-plugin-ffm/src/main/java/com/pi4j/plugin/ffm/common/poll/PollFlag.java b/plugins/pi4j-plugin-ffm/src/main/java/com/pi4j/plugin/ffm/common/poll/PollFlag.java index 830803ae..500a073a 100644 --- a/plugins/pi4j-plugin-ffm/src/main/java/com/pi4j/plugin/ffm/common/poll/PollFlag.java +++ b/plugins/pi4j-plugin-ffm/src/main/java/com/pi4j/plugin/ffm/common/poll/PollFlag.java @@ -2,6 +2,7 @@ /** * Flags for calling linux poll. + * * @see linux sources */ public final class PollFlag { diff --git a/plugins/pi4j-plugin-ffm/src/main/java/com/pi4j/plugin/ffm/common/spi/SpiIocTransfer.java b/plugins/pi4j-plugin-ffm/src/main/java/com/pi4j/plugin/ffm/common/spi/SpiIocTransfer.java index ddba9adc..f7265f41 100644 --- a/plugins/pi4j-plugin-ffm/src/main/java/com/pi4j/plugin/ffm/common/spi/SpiIocTransfer.java +++ b/plugins/pi4j-plugin-ffm/src/main/java/com/pi4j/plugin/ffm/common/spi/SpiIocTransfer.java @@ -59,6 +59,7 @@ public SpiIocTransfer from(MemorySegment buffer) throws Throwable { /** * Makes the SpiIocTransfer object from memory buffer and tx/rx buffers. + * * @param buffer main memory buffer, holding all settings data * @param txBuf send memory buffer * @param rxBuf receive memory buffer @@ -94,6 +95,7 @@ public void to(MemorySegment buffer) throws Throwable { /** * Makes memory buffer from provided memory buffer and tx/rx memory addresses. + * * @param buffer memory buffer with object data * @param txAddress send memory buffer address * @param rxAddress receive memory buffer address diff --git a/plugins/pi4j-plugin-ffm/src/main/java/com/pi4j/plugin/ffm/providers/i2c/FFMI2CProviderImpl.java b/plugins/pi4j-plugin-ffm/src/main/java/com/pi4j/plugin/ffm/providers/i2c/FFMI2CProviderImpl.java index 5cfc9b7f..85444656 100644 --- a/plugins/pi4j-plugin-ffm/src/main/java/com/pi4j/plugin/ffm/providers/i2c/FFMI2CProviderImpl.java +++ b/plugins/pi4j-plugin-ffm/src/main/java/com/pi4j/plugin/ffm/providers/i2c/FFMI2CProviderImpl.java @@ -22,9 +22,6 @@ public int getPriority() { return 200; } - /** - * {@inheritDoc} - */ @Override public I2C create(I2CConfig config) { var bus = new FFMI2CBus(config); diff --git a/plugins/pi4j-plugin-ffm/src/main/java/com/pi4j/plugin/ffm/providers/i2c/impl/I2CDirect.java b/plugins/pi4j-plugin-ffm/src/main/java/com/pi4j/plugin/ffm/providers/i2c/impl/I2CDirect.java index 33d4ee66..b604430a 100644 --- a/plugins/pi4j-plugin-ffm/src/main/java/com/pi4j/plugin/ffm/providers/i2c/impl/I2CDirect.java +++ b/plugins/pi4j-plugin-ffm/src/main/java/com/pi4j/plugin/ffm/providers/i2c/impl/I2CDirect.java @@ -21,9 +21,6 @@ public I2CDirect(I2CProvider provider, I2CConfig config, FFMI2CBus i2CBus) { super(provider, config, i2CBus); } - /** - * {@inheritDoc} - */ @Override public I2C initialize(Context context) throws InitializeException { return super.initialize(context); @@ -116,93 +113,60 @@ private int internalWrite(byte[] data, int offset, int length) { }); } - /** - * {@inheritDoc} - */ @Override public void close() { super.close(); i2CBus.close(); } - /** - * {@inheritDoc} - */ @Override public int read() { return internalRead(new byte[1], 0, 1)[0]; } - /** - * {@inheritDoc} - */ @Override public int read(byte[] buffer, int offset, int length) { internalRead(buffer, offset, length); return length; } - /** - * {@inheritDoc} - */ @Override public int write(byte b) { return internalWrite(new byte[]{b}); } - /** - * {@inheritDoc} - */ @Override public int write(byte[] data, int offset, int length) { return internalWrite(data, offset, length); } - /** - * {@inheritDoc} - */ @Override public int readRegister(int register) { return Byte.toUnsignedInt(internalRead(new byte[]{(byte) register}, new byte[1], 0, 1)[0]); } - /** - * {@inheritDoc} - */ @Override public int readRegister(byte[] register, byte[] buffer, int offset, int length) { internalRead(register, buffer, offset, length); return length; } - /** - * {@inheritDoc} - */ @Override public int readRegister(int register, byte[] buffer, int offset, int length) { internalRead(new byte[]{(byte) register}, buffer, offset, length); return length; } - /** - * {@inheritDoc} - */ @Override public int writeRegister(int register, byte b) { return internalWrite(new byte[]{(byte) register}, new byte[]{b}); } - /** - * {@inheritDoc} - */ @Override public int writeRegister(int register, byte[] data, int offset, int length) { return internalWrite(new byte[]{(byte) register}, data, offset, length); } - /** - * {@inheritDoc} - */ @Override public int writeRegister(byte[] register, byte[] data, int offset, int length) { return internalWrite(register, data, offset, length); diff --git a/plugins/pi4j-plugin-ffm/src/main/java/com/pi4j/plugin/ffm/providers/i2c/impl/I2CFile.java b/plugins/pi4j-plugin-ffm/src/main/java/com/pi4j/plugin/ffm/providers/i2c/impl/I2CFile.java index e0d8635a..6cd2807d 100644 --- a/plugins/pi4j-plugin-ffm/src/main/java/com/pi4j/plugin/ffm/providers/i2c/impl/I2CFile.java +++ b/plugins/pi4j-plugin-ffm/src/main/java/com/pi4j/plugin/ffm/providers/i2c/impl/I2CFile.java @@ -18,38 +18,22 @@ public class I2CFile extends I2CBase { private final FileDescriptorNative FILE = new FileDescriptorNative(); - /** - *

    Constructor for I2CBase.

    - * - * @param provider a {@link I2CProvider} object. - * @param config a {@link I2CConfig} object. - * @param i2CBus a {@link FFMI2CBus} object. - */ public I2CFile(I2CProvider provider, I2CConfig config, FFMI2CBus i2CBus) { super(provider, config, i2CBus); } - /** - * {@inheritDoc} - */ @Override public I2C initialize(Context context) throws InitializeException { i2CBus.selectDevice(config.device()); return super.initialize(context); } - /** - * {@inheritDoc} - */ @Override public int read() { var buffer = new byte[1]; return i2CBus.execute(this, (i2cFileDescriptor) -> FILE.read(i2cFileDescriptor, buffer, buffer.length))[0]; } - /** - * {@inheritDoc} - */ @Override public int read(byte[] buffer, int offset, int length) { var data = i2CBus.execute(this, (i2cFileDescriptor) -> FILE.read(i2cFileDescriptor, buffer, buffer.length)); @@ -57,25 +41,16 @@ public int read(byte[] buffer, int offset, int length) { return data.length; } - /** - * {@inheritDoc} - */ @Override public int write(byte b) { return i2CBus.execute(this, (i2cFileDescriptor) -> FILE.write(i2cFileDescriptor, new byte[]{b})); } - /** - * {@inheritDoc} - */ @Override public int write(byte[] data, int offset, int length) { return i2CBus.execute(this, (i2cFileDescriptor) -> FILE.write(i2cFileDescriptor, data)); } - /** - * {@inheritDoc} - */ @Override public int readRegister(int register) { var buffer = new byte[1]; @@ -84,9 +59,6 @@ public int readRegister(int register) { return read.length; } - /** - * {@inheritDoc} - */ @Override public int readRegister(byte[] register, byte[] buffer, int offset, int length) { var read = i2CBus.execute(this, (i2cFileDescriptor) -> FILE.read(i2cFileDescriptor, buffer, buffer.length)); @@ -94,9 +66,6 @@ public int readRegister(byte[] register, byte[] buffer, int offset, int length) return read.length; } - /** - * {@inheritDoc} - */ @Override public int readRegister(int register, byte[] buffer, int offset, int length) { var read = i2CBus.execute(this, (i2cFileDescriptor) -> FILE.read(i2cFileDescriptor, buffer, buffer.length)); @@ -104,17 +73,11 @@ public int readRegister(int register, byte[] buffer, int offset, int length) { return read.length; } - /** - * {@inheritDoc} - */ @Override public int writeRegister(int register, byte b) { return i2CBus.execute(this, (i2cFileDescriptor) -> FILE.write(i2cFileDescriptor, new byte[]{(byte) register, b})) - 1; } - /** - * {@inheritDoc} - */ @Override public int writeRegister(int register, byte[] data, int offset, int length) { var buffer = new byte[data.length + 1]; @@ -123,9 +86,6 @@ public int writeRegister(int register, byte[] data, int offset, int length) { return i2CBus.execute(this, (i2cFileDescriptor) -> FILE.write(i2cFileDescriptor, buffer)) - 1; } - /** - * {@inheritDoc} - */ @Override public int writeRegister(byte[] register, byte[] data, int offset, int length) { var buffer = new byte[register.length + data.length]; diff --git a/plugins/pi4j-plugin-ffm/src/main/java/com/pi4j/plugin/ffm/providers/i2c/impl/I2CSMBus.java b/plugins/pi4j-plugin-ffm/src/main/java/com/pi4j/plugin/ffm/providers/i2c/impl/I2CSMBus.java index 048a480d..ae1d6794 100644 --- a/plugins/pi4j-plugin-ffm/src/main/java/com/pi4j/plugin/ffm/providers/i2c/impl/I2CSMBus.java +++ b/plugins/pi4j-plugin-ffm/src/main/java/com/pi4j/plugin/ffm/providers/i2c/impl/I2CSMBus.java @@ -20,20 +20,10 @@ public class I2CSMBus extends I2CBase { private static final Logger logger = LoggerFactory.getLogger(I2CSMBus.class); private final SMBusNative SMBUS = new SMBusNative(); - /** - *

    Constructor for I2CBase.

    - * - * @param provider a {@link I2CProvider} object. - * @param config a {@link I2CConfig} object. - * @param i2CBus a {@link FFMI2CBus} object. - */ public I2CSMBus(I2CProvider provider, I2CConfig config, FFMI2CBus i2CBus) { super(provider, config, i2CBus); } - /** - * {@inheritDoc} - */ @Override public I2C initialize(Context context) throws InitializeException { i2CBus.selectDevice(config.device()); @@ -84,70 +74,46 @@ private byte[] readInternal(int register, int size) { }); } - /** - * {@inheritDoc} - */ @Override public byte readByte() { return i2CBus.execute(this, SMBUS::readByte).byteValue(); } - /** - * {@inheritDoc} - */ @Override public int read() { // this is needed, because we are receiving raw bytes, which we have to convert to proper int return i2CBus.execute(this, SMBUS::readByte); } - /** - * {@inheritDoc} - */ @Override public int read(byte[] data, int offset, int length) { throw new UnsupportedOperationException("SMBus protocol does not support reading to data arrays without register. " + "Please, use I2CDirect or I2CFile provider instead."); } - /** - * {@inheritDoc} - */ @Override public int write(byte b) { return i2CBus.execute(this, (i2cFileDescriptor) -> SMBUS.writeByte(i2cFileDescriptor, b)); } - /** - * {@inheritDoc} - */ @Override public int write(byte[] data, int offset, int length) { throw new UnsupportedOperationException("SMBus protocol does not support writing data arrays without register. " + "Please, use I2CDirect or I2CFile provider instead."); } - /** - * {@inheritDoc} - */ @Override public int readRegister(int register) { // this is needed, because we are receiving raw bytes, which we have to convert to proper int return Byte.toUnsignedInt(readInternal(register, 1)[0]); } - /** - * {@inheritDoc} - */ @Override public int readRegister(byte[] register, byte[] data, int offset, int length) { throw new UnsupportedOperationException("SMBus protocol does not support reading multiregister devices. " + "Please, use I2CDirect or I2CFile provider instead."); } - /** - * {@inheritDoc} - */ @Override public int readRegister(int register, byte[] buffer, int offset, int length) { Objects.checkFromIndexSize(offset, length, buffer.length); @@ -156,17 +122,11 @@ public int readRegister(int register, byte[] buffer, int offset, int length) { return result.length; } - /** - * {@inheritDoc} - */ @Override public int writeRegister(int register, byte b) { return writeInternal(register, new byte[]{b}); } - /** - * {@inheritDoc} - */ @Override public int writeRegister(int register, byte[] data, int offset, int length) { Objects.checkFromIndexSize(offset, length, data.length); @@ -174,9 +134,6 @@ public int writeRegister(int register, byte[] data, int offset, int length) { return writeInternal(register, writeData); } - /** - * {@inheritDoc} - */ @Override public int writeRegister(byte[] register, byte[] data, int offset, int length) { Objects.checkFromIndexSize(offset, length, data.length); @@ -191,9 +148,6 @@ public int writeRegister(byte[] register, byte[] data, int offset, int length) { return writeRegister(byteRegister, writeData); } - /** - * {@inheritDoc} - */ @Override public void close() { super.close(); diff --git a/plugins/pi4j-plugin-ffm/src/main/java/com/pi4j/plugin/ffm/providers/pwm/FFMPwmHardware.java b/plugins/pi4j-plugin-ffm/src/main/java/com/pi4j/plugin/ffm/providers/pwm/FFMPwmHardware.java index 88439d43..5e4758e5 100644 --- a/plugins/pi4j-plugin-ffm/src/main/java/com/pi4j/plugin/ffm/providers/pwm/FFMPwmHardware.java +++ b/plugins/pi4j-plugin-ffm/src/main/java/com/pi4j/plugin/ffm/providers/pwm/FFMPwmHardware.java @@ -51,9 +51,6 @@ public FFMPwmHardware(PwmProvider provider, PwmConfig config) { FFMPermissionHelper.checkDevicePermissions(CHIP_PATH + chip, config); } - /** - * {@inheritDoc} - */ @Override public Pwm initialize(Context context) throws InitializeException { var pwmChipFile = CHIP_PATH + chip; diff --git a/plugins/pi4j-plugin-ffm/src/main/java/com/pi4j/plugin/ffm/providers/pwm/FFMPwmProviderImpl.java b/plugins/pi4j-plugin-ffm/src/main/java/com/pi4j/plugin/ffm/providers/pwm/FFMPwmProviderImpl.java index 313dc5c3..c5e75abf 100644 --- a/plugins/pi4j-plugin-ffm/src/main/java/com/pi4j/plugin/ffm/providers/pwm/FFMPwmProviderImpl.java +++ b/plugins/pi4j-plugin-ffm/src/main/java/com/pi4j/plugin/ffm/providers/pwm/FFMPwmProviderImpl.java @@ -17,9 +17,6 @@ public int getPriority() { return 200; } - /** - * {@inheritDoc} - */ @Override public Pwm create(PwmConfig config) { // validate PWM type diff --git a/plugins/pi4j-plugin-ffm/src/main/java/com/pi4j/plugin/ffm/providers/spi/FFMSpi.java b/plugins/pi4j-plugin-ffm/src/main/java/com/pi4j/plugin/ffm/providers/spi/FFMSpi.java index 0633d077..6e2a5d28 100644 --- a/plugins/pi4j-plugin-ffm/src/main/java/com/pi4j/plugin/ffm/providers/spi/FFMSpi.java +++ b/plugins/pi4j-plugin-ffm/src/main/java/com/pi4j/plugin/ffm/providers/spi/FFMSpi.java @@ -59,9 +59,6 @@ public FFMSpi(SpiProvider provider, SpiConfig config) { FFMPermissionHelper.checkDevicePermissions(path, config); } - /** - * {@inheritDoc} - */ @Override public Spi initialize(Context context) throws InitializeException { super.initialize(context); @@ -126,18 +123,12 @@ private int readBufferSize() { } } - /** - * {@inheritDoc} - */ @Override public Spi shutdownInternal(Context context) throws ShutdownException { FILE.close(spiFileDescriptor); return super.shutdownInternal(context); } - /** - * {@inheritDoc} - */ @Override public int transfer(byte[] write, int writeOffset, byte[] read, int readOffset, int numberOfBytes) { checkClosed(); @@ -165,41 +156,26 @@ public int transfer(byte[] write, int writeOffset, byte[] read, int readOffset, return totalRead; } - /** - * {@inheritDoc} - */ @Override public int write(byte data) { return write(new byte[]{data}, 0, 1); } - /** - * {@inheritDoc} - */ @Override public int write(byte[] data, int offset, int length) { return transfer(data, offset, new byte[data.length], 0, length); } - /** - * {@inheritDoc} - */ @Override public void writeThenRead(byte[] write, byte[] read) { writeThenRead(write, 0, write.length, 0, read, 0, read.length); } - /** - * {@inheritDoc} - */ @Override public void writeThenRead(byte[] write, int readDelayNanos, byte[] read) { writeThenRead(write, 0, write.length, readDelayNanos, read, 0, read.length); } - /** - * {@inheritDoc} - */ @Override public void writeThenRead(byte[] write, int writeOffset, int writeLength, int readDelayNanos, byte[] read, int readOffset, int readLength) { checkClosed(); @@ -257,25 +233,16 @@ public void writeThenRead(byte[] write, int writeOffset, int writeLength, int re logger.trace("{} - Read buffer: {}", path, HexFormatter.format(read)); } - /** - * {@inheritDoc} - */ @Override public int read() { return readByte(); } - /** - * {@inheritDoc} - */ @Override public int read(byte[] buffer, int offset, int length) { return transfer(new byte[length], 0, buffer, offset, length); } - /** - * {@inheritDoc} - */ @Override public byte readByte() { var buffer = new byte[1]; diff --git a/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/Mock.java b/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/Mock.java index a0a0be65..cacffc86 100644 --- a/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/Mock.java +++ b/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/Mock.java @@ -27,12 +27,6 @@ * #L% */ -/** - *

    Mock class.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id - */ public class Mock { /** * Constant NAME="Mock" diff --git a/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/MockPlugin.java b/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/MockPlugin.java index 3933927e..e26fafbf 100644 --- a/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/MockPlugin.java +++ b/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/MockPlugin.java @@ -36,12 +36,6 @@ import com.pi4j.plugin.mock.provider.spi.MockSpiProvider; import com.pi4j.provider.Provider; -/** - *

    MockPlugin class.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id - */ public class MockPlugin implements Plugin { private final Provider[] providers = { @@ -57,9 +51,6 @@ public boolean isMock() { return true; } - /** - * {@inheritDoc} - */ @Override public void initialize(PluginService service) { diff --git a/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/provider/gpio/digital/MockDigitalInput.java b/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/provider/gpio/digital/MockDigitalInput.java index 4ae3d26f..961b0799 100644 --- a/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/provider/gpio/digital/MockDigitalInput.java +++ b/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/provider/gpio/digital/MockDigitalInput.java @@ -30,38 +30,19 @@ import com.pi4j.io.gpio.digital.*; -/** - *

    MockDigitalInput class.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id - */ public class MockDigitalInput extends DigitalInputBase implements DigitalInput { private DigitalState state = DigitalState.LOW; - /** - *

    Constructor for MockDigitalInput.

    - * - * @param provider a {@link com.pi4j.io.gpio.digital.DigitalInputProvider} object. - * @param config a {@link com.pi4j.io.gpio.digital.DigitalInputConfig} object. - */ public MockDigitalInput(DigitalInputProvider provider, DigitalInputConfig config){ super(provider, config); } - /** {@inheritDoc} */ @Override public DigitalState state() { return this.state; } - /** - *

    mockState.

    - * - * @param state a {@link com.pi4j.io.gpio.digital.DigitalState} object. - * @return a {@link com.pi4j.plugin.mock.provider.gpio.digital.MockDigitalInput} object. - */ public MockDigitalInput mockState(DigitalState state){ if(!this.state.equals(state)) { this.state = state; diff --git a/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/provider/gpio/digital/MockDigitalInputProvider.java b/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/provider/gpio/digital/MockDigitalInputProvider.java index 15af88d8..7f7c3526 100644 --- a/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/provider/gpio/digital/MockDigitalInputProvider.java +++ b/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/provider/gpio/digital/MockDigitalInputProvider.java @@ -32,20 +32,12 @@ /** *

    MockDigitalInputProvider interface.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface MockDigitalInputProvider extends DigitalInputProvider { /** Constant NAME="Mock.DIGITAL_INPUT_PROVIDER_NAME" */ String NAME = Mock.DIGITAL_INPUT_PROVIDER_NAME; /** Constant ID="Mock.DIGITAL_INPUT_PROVIDER_ID" */ String ID = Mock.DIGITAL_INPUT_PROVIDER_ID; - /** - *

    newInstance.

    - * - * @return a {@link com.pi4j.plugin.mock.provider.gpio.digital.MockDigitalInputProvider} object. - */ static MockDigitalInputProvider newInstance() { return new MockDigitalInputProviderImpl(); } diff --git a/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/provider/gpio/digital/MockDigitalInputProviderImpl.java b/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/provider/gpio/digital/MockDigitalInputProviderImpl.java index 299283c0..50df16ef 100644 --- a/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/provider/gpio/digital/MockDigitalInputProviderImpl.java +++ b/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/provider/gpio/digital/MockDigitalInputProviderImpl.java @@ -31,17 +31,8 @@ import com.pi4j.io.gpio.digital.DigitalInputConfig; import com.pi4j.io.gpio.digital.DigitalInputProviderBase; -/** - *

    MockDigitalInputProviderImpl class.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id - */ public class MockDigitalInputProviderImpl extends DigitalInputProviderBase implements MockDigitalInputProvider { - /** - *

    Constructor for MockDigitalInputProviderImpl.

    - */ public MockDigitalInputProviderImpl() { this.id = ID; this.name = NAME; @@ -53,9 +44,6 @@ public int getPriority() { return 1000; } - /** - * {@inheritDoc} - */ @Override public DigitalInput create(DigitalInputConfig config) { MockDigitalInput input = new MockDigitalInput(this, config); diff --git a/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/provider/gpio/digital/MockDigitalOutput.java b/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/provider/gpio/digital/MockDigitalOutput.java index 67473a64..d4d5ffeb 100644 --- a/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/provider/gpio/digital/MockDigitalOutput.java +++ b/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/provider/gpio/digital/MockDigitalOutput.java @@ -36,28 +36,12 @@ import com.pi4j.io.gpio.digital.DigitalState; -/** - *

    MockDigitalOutput class.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id - */ public class MockDigitalOutput extends DigitalOutputBase implements DigitalOutput { - /** - *

    Constructor for MockDigitalOutput.

    - * - * @param provider a {@link com.pi4j.io.gpio.digital.DigitalOutputProvider} object. - * @param config a {@link com.pi4j.io.gpio.digital.DigitalOutputConfig} object. - */ public MockDigitalOutput(DigitalOutputProvider provider, DigitalOutputConfig config){ super(provider, config); } /** - *

    mockState.

    - * - * @param state a {@link com.pi4j.io.gpio.digital.DigitalState} object. - * @return a {@link com.pi4j.plugin.mock.provider.gpio.digital.MockDigitalOutput} object. * @throws IOException if any. */ public MockDigitalOutput mockState(DigitalState state) throws IOException { diff --git a/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/provider/gpio/digital/MockDigitalOutputProvider.java b/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/provider/gpio/digital/MockDigitalOutputProvider.java index 420fae4f..ba2dfd12 100644 --- a/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/provider/gpio/digital/MockDigitalOutputProvider.java +++ b/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/provider/gpio/digital/MockDigitalOutputProvider.java @@ -32,20 +32,12 @@ /** *

    MockDigitalOutputProvider interface.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface MockDigitalOutputProvider extends DigitalOutputProvider { /** Constant NAME="Mock.DIGITAL_OUTPUT_PROVIDER_NAME" */ String NAME = Mock.DIGITAL_OUTPUT_PROVIDER_NAME; /** Constant ID="Mock.DIGITAL_OUTPUT_PROVIDER_ID" */ String ID = Mock.DIGITAL_OUTPUT_PROVIDER_ID; - /** - *

    newInstance.

    - * - * @return a {@link com.pi4j.plugin.mock.provider.gpio.digital.MockDigitalOutputProvider} object. - */ static MockDigitalOutputProvider newInstance() { return new MockDigitalOutputProviderImpl(); } diff --git a/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/provider/gpio/digital/MockDigitalOutputProviderImpl.java b/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/provider/gpio/digital/MockDigitalOutputProviderImpl.java index 6ea0ad1a..11749fb7 100644 --- a/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/provider/gpio/digital/MockDigitalOutputProviderImpl.java +++ b/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/provider/gpio/digital/MockDigitalOutputProviderImpl.java @@ -31,17 +31,8 @@ import com.pi4j.io.gpio.digital.DigitalOutputConfig; import com.pi4j.io.gpio.digital.DigitalOutputProviderBase; -/** - *

    MockDigitalOutputProviderImpl class.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id - */ public class MockDigitalOutputProviderImpl extends DigitalOutputProviderBase implements MockDigitalOutputProvider { - /** - *

    Constructor for MockDigitalOutputProviderImpl.

    - */ public MockDigitalOutputProviderImpl() { this.id = ID; this.name = NAME; @@ -53,9 +44,6 @@ public int getPriority() { return 1000; } - /** - * {@inheritDoc} - */ @Override public DigitalOutput create(DigitalOutputConfig config) { MockDigitalOutput output = new MockDigitalOutput(this, config); diff --git a/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/provider/i2c/MockI2C.java b/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/provider/i2c/MockI2C.java index 27e94b69..75d4d056 100644 --- a/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/provider/i2c/MockI2C.java +++ b/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/provider/i2c/MockI2C.java @@ -37,12 +37,6 @@ import java.util.ArrayDeque; import java.util.Objects; -/** - *

    MockI2C class.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id - */ public class MockI2C extends I2CBase implements I2C, I2CRegisterDataReader, I2CRegisterDataWriter { private static final Logger logger = LoggerFactory.getLogger(MockI2C.class); @@ -57,19 +51,12 @@ public class MockI2C extends I2CBase implements I2C, I2CRegisterData protected ArrayDeque[] registers = new ArrayDeque[512]; // 512 supported registers (0-511) protected ArrayDeque raw = new ArrayDeque<>(); - /** - *

    Constructor for MockI2C.

    - * - * @param provider a {@link com.pi4j.io.i2c.I2CProvider} object. - * @param config a {@link com.pi4j.io.i2c.I2CConfig} object. - */ public MockI2C(I2CProvider provider, I2CConfig config){ super(provider, config, new MockI2CBus(config)); logger.debug("[{}::{}] :: CREATE(BUS={}; DEVICE={})", Mock.I2C_PROVIDER_NAME, this.id, config.bus(), config.device()); } - /** {@inheritDoc} */ @Override public void close() { super.close(); @@ -81,7 +68,6 @@ public void close() { // RAW DEVICE WRITE FUNCTIONS // ------------------------------------------------------------------- - /** {@inheritDoc} */ @Override public int write(byte b) { raw.add(b); @@ -92,7 +78,6 @@ public int write(byte b) { return 0; } - /** {@inheritDoc} */ @Override public int write(byte[] data, int offset, int length) { Objects.checkFromIndexSize(offset, length, data.length); @@ -106,7 +91,6 @@ public int write(byte[] data, int offset, int length) { return length; } - /** {@inheritDoc} */ @Override public int write(Charset charset, CharSequence data) { byte[] buffer = data.toString().getBytes(charset); @@ -121,7 +105,6 @@ public int write(Charset charset, CharSequence data) { // RAW DEVICE READ FUNCTIONS // ------------------------------------------------------------------- - /** {@inheritDoc} */ @Override public int read() { if(raw.isEmpty()) return -1; @@ -133,7 +116,6 @@ public int read() { return b; } - /** {@inheritDoc} */ @Override public int read(byte[] buffer, int offset, int length) { Objects.checkFromIndexSize(offset, length, buffer.length); @@ -155,7 +137,6 @@ public int read(byte[] buffer, int offset, int length) { return counter; } - /** {@inheritDoc} */ @Override public String readString(Charset charset, int length) { if(raw.isEmpty()) return null; @@ -173,7 +154,6 @@ public String readString(Charset charset, int length) { // DEVICE REGISTER WRITE FUNCTIONS // ------------------------------------------------------------------- - /** {@inheritDoc} */ @Override public int writeRegister(int register, byte b) { @@ -190,7 +170,6 @@ public int writeRegister(int register, byte b) { return 0; } - /** {@inheritDoc} */ @Override public int writeRegister(int register, byte[] data, int offset, int length) { Objects.checkFromIndexSize(offset, length, data.length); @@ -229,7 +208,6 @@ public int writeRegister(byte[] register, byte[] data, int offset, int length) { return length; } - /** {@inheritDoc} */ @Override public int writeRegister(int register, Charset charset, CharSequence data) { if (registers[register] == null) { @@ -249,7 +227,6 @@ public int writeRegister(int register, Charset charset, CharSequence data) { // DEVICE REGISTER READ FUNCTIONS // ------------------------------------------------------------------- - /** {@inheritDoc} */ @Override public int readRegister(int register) { if(registers[register] == null) throw new IllegalStateException("No available data to read"); @@ -265,7 +242,6 @@ public int readRegister(int register) { } - /** {@inheritDoc} */ @Override public int readRegister(byte[] register, byte[] buffer, int offset, int length) { int internalOffset = (register[0] & 0xff) + (register[1] << 8); @@ -295,7 +271,6 @@ public int readRegister(byte[] register, byte[] buffer, int offset, int length) return counter; } - /** {@inheritDoc} */ @Override public int readRegister(int register, byte[] buffer, int offset, int length) { if(registers[register] == null) return -1; @@ -317,7 +292,6 @@ public int readRegister(int register, byte[] buffer, int offset, int length) { return counter; } - /** {@inheritDoc} */ @Override public String readRegisterString(int register, Charset charset, int length) { if(registers[register] == null) return null; diff --git a/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/provider/i2c/MockI2CProvider.java b/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/provider/i2c/MockI2CProvider.java index 6dd88ed5..b184d1fc 100644 --- a/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/provider/i2c/MockI2CProvider.java +++ b/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/provider/i2c/MockI2CProvider.java @@ -32,20 +32,12 @@ /** *

    MockI2CProvider interface.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface MockI2CProvider extends I2CProvider { /** Constant NAME="Mock.I2C_PROVIDER_NAME" */ String NAME = Mock.I2C_PROVIDER_NAME; /** Constant ID="Mock.I2C_PROVIDER_ID" */ String ID = Mock.I2C_PROVIDER_ID; - /** - *

    newInstance.

    - * - * @return a {@link com.pi4j.plugin.mock.provider.i2c.MockI2CProvider} object. - */ static MockI2CProvider newInstance() { return new MockI2CProviderImpl(); } diff --git a/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/provider/i2c/MockI2CProviderImpl.java b/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/provider/i2c/MockI2CProviderImpl.java index 2129a83f..bc392020 100644 --- a/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/provider/i2c/MockI2CProviderImpl.java +++ b/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/provider/i2c/MockI2CProviderImpl.java @@ -31,17 +31,8 @@ import com.pi4j.io.i2c.I2CConfig; import com.pi4j.io.i2c.I2CProviderBase; -/** - *

    MockI2CProviderImpl class.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id - */ public class MockI2CProviderImpl extends I2CProviderBase implements MockI2CProvider { - /** - *

    Constructor for MockI2CProviderImpl.

    - */ public MockI2CProviderImpl() { this.id = ID; this.name = NAME; @@ -53,9 +44,6 @@ public int getPriority() { return 1000; } - /** - * {@inheritDoc} - */ @Override public I2C create(I2CConfig config) { MockI2C i2C = new MockI2C(this, config); diff --git a/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/provider/pwm/MockPwm.java b/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/provider/pwm/MockPwm.java index fcb26e1a..fdb1087c 100644 --- a/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/provider/pwm/MockPwm.java +++ b/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/provider/pwm/MockPwm.java @@ -34,32 +34,18 @@ import com.pi4j.io.pwm.PwmProvider; -/** - *

    MockPwm class.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id - */ public class MockPwm extends PwmBase implements Pwm { - /** - *

    Constructor for MockPwm.

    - * - * @param provider a {@link com.pi4j.io.pwm.PwmProvider} object. - * @param config a {@link com.pi4j.io.pwm.PwmConfig} object. - */ public MockPwm(PwmProvider provider, PwmConfig config){ super(provider, config); } - /** {@inheritDoc} */ @Override public Pwm on() throws IOException { this.onState = true; return this; } - /** {@inheritDoc} */ @Override public Pwm off() throws IOException { this.onState = false; diff --git a/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/provider/pwm/MockPwmProvider.java b/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/provider/pwm/MockPwmProvider.java index 63554f48..81c60d86 100644 --- a/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/provider/pwm/MockPwmProvider.java +++ b/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/provider/pwm/MockPwmProvider.java @@ -32,20 +32,12 @@ /** *

    MockPwmProvider interface.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface MockPwmProvider extends PwmProvider { /** Constant NAME="Mock.PWM_PROVIDER_NAME" */ String NAME = Mock.PWM_PROVIDER_NAME; /** Constant ID="Mock.PWM_PROVIDER_ID" */ String ID = Mock.PWM_PROVIDER_ID; - /** - *

    newInstance.

    - * - * @return a {@link com.pi4j.plugin.mock.provider.pwm.MockPwmProvider} object. - */ static MockPwmProvider newInstance() { return new MockPwmProviderImpl(); } diff --git a/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/provider/pwm/MockPwmProviderImpl.java b/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/provider/pwm/MockPwmProviderImpl.java index 71adedee..3be67680 100644 --- a/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/provider/pwm/MockPwmProviderImpl.java +++ b/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/provider/pwm/MockPwmProviderImpl.java @@ -31,17 +31,8 @@ import com.pi4j.io.pwm.PwmConfig; import com.pi4j.io.pwm.PwmProviderBase; -/** - *

    MockPwmProviderImpl class.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id - */ public class MockPwmProviderImpl extends PwmProviderBase implements MockPwmProvider { - /** - *

    Constructor for MockPwmProviderImpl.

    - */ public MockPwmProviderImpl() { this.id = ID; this.name = NAME; @@ -53,9 +44,6 @@ public int getPriority() { return 1000; } - /** - * {@inheritDoc} - */ @Override public Pwm create(PwmConfig config) { MockPwm pwm = new MockPwm(this, config); diff --git a/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/provider/spi/MockSpi.java b/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/provider/spi/MockSpi.java index a5dba0ec..79bd5f88 100644 --- a/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/provider/spi/MockSpi.java +++ b/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/provider/spi/MockSpi.java @@ -40,12 +40,6 @@ import java.util.ArrayDeque; import java.util.Objects; -/** - *

    MockSpi class.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id - */ public class MockSpi extends SpiBase implements Spi { private static final Logger logger = LoggerFactory.getLogger(MockSpi.class); @@ -53,12 +47,6 @@ public class MockSpi extends SpiBase implements Spi { protected ArrayDeque raw = new ArrayDeque<>(); - /** - *

    Constructor for MockSpi.

    - * - * @param provider a {@link com.pi4j.io.spi.SpiProvider} object. - * @param config a {@link com.pi4j.io.spi.SpiConfig} object. - */ public MockSpi(SpiProvider provider, SpiConfig config) { super(provider, config); logPreamble = "[" + Mock.SPI_PROVIDER_NAME + "::" + this.id + "] ::"; @@ -82,18 +70,12 @@ public byte[] readEntireMockBuffer() { return bytes; } - /** - * {@inheritDoc} - */ @Override public void close() { logger.info("{} CLOSE(CHANNEL={}; BAUD={})", logPreamble, config.channel(), config.baud()); super.close(); } - /** - * {@inheritDoc} - */ @Override public int transfer(byte[] write, int writeOffset, byte[] read, int readOffset, int numberOfBytes) { byte[] prepared = new byte[numberOfBytes]; @@ -113,9 +95,6 @@ public int transfer(byte[] write, int writeOffset, byte[] read, int readOffset, return 0; } - /** - * {@inheritDoc} - */ @Override public int write(byte b) { raw.add(b); @@ -123,9 +102,6 @@ public int write(byte b) { return 0; } - /** - * {@inheritDoc} - */ @Override public int write(byte[] data, int offset, int length) { writeNoLogging(data, offset, length); @@ -140,9 +116,6 @@ private void writeNoLogging(byte[] data, int offset, int length) { } } - /** - * {@inheritDoc} - */ @Override public int write(Charset charset, CharSequence data) { byte[] buffer = data.toString().getBytes(charset); @@ -153,9 +126,6 @@ public int write(Charset charset, CharSequence data) { return data.length(); } - /** - * {@inheritDoc} - */ @Override public int read() { if (raw.isEmpty()) return -1; @@ -164,9 +134,6 @@ public int read() { return b; } - /** - * {@inheritDoc} - */ @Override public int read(byte[] buffer, int offset, int length) { Integer counter = readNoLogging(buffer, offset, length); diff --git a/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/provider/spi/MockSpiProvider.java b/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/provider/spi/MockSpiProvider.java index 961b582d..67ad6435 100644 --- a/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/provider/spi/MockSpiProvider.java +++ b/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/provider/spi/MockSpiProvider.java @@ -32,20 +32,12 @@ /** *

    MockSpiProvider interface.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id */ public interface MockSpiProvider extends SpiProvider{ /** Constant NAME="Mock.SPI_PROVIDER_NAME" */ String NAME = Mock.SPI_PROVIDER_NAME; /** Constant ID="Mock.SPI_PROVIDER_ID" */ String ID = Mock.SPI_PROVIDER_ID; - /** - *

    newInstance.

    - * - * @return a {@link com.pi4j.plugin.mock.provider.spi.MockSpiProvider} object. - */ static MockSpiProvider newInstance() { return new MockSpiProviderImpl(); } diff --git a/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/provider/spi/MockSpiProviderImpl.java b/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/provider/spi/MockSpiProviderImpl.java index 62807d24..05262e1a 100644 --- a/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/provider/spi/MockSpiProviderImpl.java +++ b/plugins/pi4j-plugin-mock/src/main/java/com/pi4j/plugin/mock/provider/spi/MockSpiProviderImpl.java @@ -31,17 +31,8 @@ import com.pi4j.io.spi.SpiConfig; import com.pi4j.io.spi.SpiProviderBase; -/** - *

    MockSpiProviderImpl class.

    - * - * @author Robert Savage (http://www.savagehomeautomation.com) - * @version $Id: $Id - */ public class MockSpiProviderImpl extends SpiProviderBase implements MockSpiProvider { - /** - *

    Constructor for MockSpiProviderImpl.

    - */ public MockSpiProviderImpl() { this.id = ID; this.name = NAME; @@ -53,9 +44,6 @@ public int getPriority() { return 1000; } - /** - * {@inheritDoc} - */ @Override public Spi create(SpiConfig config) { MockSpi spi = new MockSpi(this, config);