You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hugegraph.apache.org by GitBox <gi...@apache.org> on 2022/04/27 10:06:43 UTC

[GitHub] [incubator-hugegraph] seagle-yuan commented on a diff in pull request #1852: fix core-backend checkstyle issue

seagle-yuan commented on code in PR #1852:
URL: https://github.com/apache/incubator-hugegraph/pull/1852#discussion_r859615701


##########
hugegraph-core/src/main/java/com/baidu/hugegraph/backend/store/BackendEntry.java:
##########
@@ -71,63 +71,64 @@ public boolean equals(Object obj) {
         }
     }
 
-    public HugeType type();
+    HugeType type();
 
     @Override
-    public Id id();
+    Id id();
 
-    public Id originId();
+    Id originId();
 
-    public Id subId();
+    Id subId();
 
-    public long ttl();
+    long ttl();
 
-    public int columnsSize();
-    public Collection<BackendColumn> columns();
+    int columnsSize();
 
-    public void columns(Collection<BackendColumn> columns);
-    public void columns(BackendColumn column);
+    Collection<BackendColumn> columns();
 
-    public void merge(BackendEntry other);
-    public boolean mergeable(BackendEntry other);
+    void columns(Collection<BackendColumn> columns);
 
-    public void clear();
+    void columns(BackendColumn column);
 
-    public default boolean belongToMe(BackendColumn column) {
+    void merge(BackendEntry other);
+
+    boolean mergeable(BackendEntry other);
+
+    void clear();
+
+    default boolean belongToMe(BackendColumn column) {
         return Bytes.prefixWith(column.name, id().asBytes());
     }
 
-    public default boolean olap() {
+    default boolean olap() {
         return false;
     }
 
-    public interface BackendIterator<T> extends Iterator<T>, AutoCloseable {
+    interface BackendIterator<T> extends Iterator<T>, AutoCloseable {
 
         @Override
-        public void close();
+        void close();
 
-        public byte[] position();
+        byte[] position();
     }
 
-    public interface BackendColumnIterator
-           extends BackendIterator<BackendColumn> {
+    interface BackendColumnIterator extends BackendIterator<BackendColumn> {
 
-        public static BackendColumnIterator empty() {
+        static BackendColumnIterator empty() {
             return EMPTY;
         }
 
-        public static BackendColumnIterator iterator(BackendColumn element) {
+        static BackendColumnIterator iterator(BackendColumn element) {
             return new OneColumnIterator(element);
         }
 
-        public static BackendColumnIterator wrap(Iterator<BackendColumn> iter) {
+        static BackendColumnIterator wrap(Iterator<BackendColumn> iter) {
             return new BackendColumnIteratorWrapper(iter);
         }
 
-        public static final BackendColumnIterator EMPTY = new EmptyIterator();
+        BackendColumnIterator EMPTY = new EmptyIterator();

Review Comment:
   an interface can contain constant declarations. All constant values defined in an interface are implicitly public, static, and final. Once again, you can omit these modifiers.
   
   https://docs.oracle.com/javase/tutorial/java/IandI/interfaceDef.html



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org