Skip to main content
Commonmark migration
Source Link

In this Wolves, Goats and Cabbages in Java question (here is a link to the pre-edited version), Java code is presented to solve the problem.

The code requires pre-processing by a third-party tool in order to function.

The third-party tool adds a number of 'template' or 'boilerplate' methods that make the code complete. In Java terms, these are things like getters, setters, toString(), equals(), and hashCode().

Without pre-processing the code, it is:

  • full of errors, and will not compile.
  • comprehensively broken in 'standard' IDE's like Eclipse, IntelliJ, Netbeans, etc.

In order to pre-process the code, you need to download the pre-processor, as well as plugins for the various IDEs so that they are modified to accommodate these pre-processor annotations.

These downloads are from a non-official site, and are not part of any standard tool-chain.

For example, from the question we have the interface Action, and the class ActionImpl:

import java.util.Collection;

public interface Action<T> {

    Action<T> previous();

    T data();

    Collection<Action<T>> children();

    void children(Collection<Action<T>> children);

}

and

@Accessors(fluent = true, chain = false)
@Data()
@EqualsAndHashCode(of = "data")
@ToString(of = {"data"})
public class ActionImpl<T> implements Action<T> {

    private final Action<T> previous;
    private final T data;
    private Collection<Action<T>> children;

}

In Java terms, the ActionImpl class is missing four methods:

  • previous()
  • data()
  • children()
  • children(Collection<Action<T>>)

Additionally, there are compile/IDE errors for all the @Annotations which do not exist.

This makes the class fail to compile, and, essentially, there is nothing to review ;-)

##Question:

Question:

Is it working code, or is it off-topic?

In this Wolves, Goats and Cabbages in Java question (here is a link to the pre-edited version), Java code is presented to solve the problem.

The code requires pre-processing by a third-party tool in order to function.

The third-party tool adds a number of 'template' or 'boilerplate' methods that make the code complete. In Java terms, these are things like getters, setters, toString(), equals(), and hashCode().

Without pre-processing the code, it is:

  • full of errors, and will not compile.
  • comprehensively broken in 'standard' IDE's like Eclipse, IntelliJ, Netbeans, etc.

In order to pre-process the code, you need to download the pre-processor, as well as plugins for the various IDEs so that they are modified to accommodate these pre-processor annotations.

These downloads are from a non-official site, and are not part of any standard tool-chain.

For example, from the question we have the interface Action, and the class ActionImpl:

import java.util.Collection;

public interface Action<T> {

    Action<T> previous();

    T data();

    Collection<Action<T>> children();

    void children(Collection<Action<T>> children);

}

and

@Accessors(fluent = true, chain = false)
@Data()
@EqualsAndHashCode(of = "data")
@ToString(of = {"data"})
public class ActionImpl<T> implements Action<T> {

    private final Action<T> previous;
    private final T data;
    private Collection<Action<T>> children;

}

In Java terms, the ActionImpl class is missing four methods:

  • previous()
  • data()
  • children()
  • children(Collection<Action<T>>)

Additionally, there are compile/IDE errors for all the @Annotations which do not exist.

This makes the class fail to compile, and, essentially, there is nothing to review ;-)

##Question:

Is it working code, or is it off-topic?

In this Wolves, Goats and Cabbages in Java question (here is a link to the pre-edited version), Java code is presented to solve the problem.

The code requires pre-processing by a third-party tool in order to function.

The third-party tool adds a number of 'template' or 'boilerplate' methods that make the code complete. In Java terms, these are things like getters, setters, toString(), equals(), and hashCode().

Without pre-processing the code, it is:

  • full of errors, and will not compile.
  • comprehensively broken in 'standard' IDE's like Eclipse, IntelliJ, Netbeans, etc.

In order to pre-process the code, you need to download the pre-processor, as well as plugins for the various IDEs so that they are modified to accommodate these pre-processor annotations.

These downloads are from a non-official site, and are not part of any standard tool-chain.

For example, from the question we have the interface Action, and the class ActionImpl:

import java.util.Collection;

public interface Action<T> {

    Action<T> previous();

    T data();

    Collection<Action<T>> children();

    void children(Collection<Action<T>> children);

}

and

@Accessors(fluent = true, chain = false)
@Data()
@EqualsAndHashCode(of = "data")
@ToString(of = {"data"})
public class ActionImpl<T> implements Action<T> {

    private final Action<T> previous;
    private final T data;
    private Collection<Action<T>> children;

}

In Java terms, the ActionImpl class is missing four methods:

  • previous()
  • data()
  • children()
  • children(Collection<Action<T>>)

Additionally, there are compile/IDE errors for all the @Annotations which do not exist.

This makes the class fail to compile, and, essentially, there is nothing to review ;-)

Question:

Is it working code, or is it off-topic?

replaced http://codereview.stackexchange.com/ with https://codereview.stackexchange.com/
Source Link

In this Wolves, Goats and Cabbages in JavaWolves, Goats and Cabbages in Java question (here is a link to the pre-edited versionhere is a link to the pre-edited version), Java code is presented to solve the problem.

The code requires pre-processing by a third-party tool in order to function.

The third-party tool adds a number of 'template' or 'boilerplate' methods that make the code complete. In Java terms, these are things like getters, setters, toString(), equals(), and hashCode().

Without pre-processing the code, it is:

  • full of errors, and will not compile.
  • comprehensively broken in 'standard' IDE's like Eclipse, IntelliJ, Netbeans, etc.

In order to pre-process the code, you need to download the pre-processor, as well as plugins for the various IDEs so that they are modified to accommodate these pre-processor annotations.

These downloads are from a non-official site, and are not part of any standard tool-chain.

For example, from the question we have the interface Action, and the class ActionImpl:

import java.util.Collection;

public interface Action<T> {

    Action<T> previous();

    T data();

    Collection<Action<T>> children();

    void children(Collection<Action<T>> children);

}

and

@Accessors(fluent = true, chain = false)
@Data()
@EqualsAndHashCode(of = "data")
@ToString(of = {"data"})
public class ActionImpl<T> implements Action<T> {

    private final Action<T> previous;
    private final T data;
    private Collection<Action<T>> children;

}

In Java terms, the ActionImpl class is missing four methods:

  • previous()
  • data()
  • children()
  • children(Collection<Action<T>>)

Additionally, there are compile/IDE errors for all the @Annotations which do not exist.

This makes the class fail to compile, and, essentially, there is nothing to review ;-)

##Question:

Is it working code, or is it off-topic?

In this Wolves, Goats and Cabbages in Java question (here is a link to the pre-edited version), Java code is presented to solve the problem.

The code requires pre-processing by a third-party tool in order to function.

The third-party tool adds a number of 'template' or 'boilerplate' methods that make the code complete. In Java terms, these are things like getters, setters, toString(), equals(), and hashCode().

Without pre-processing the code, it is:

  • full of errors, and will not compile.
  • comprehensively broken in 'standard' IDE's like Eclipse, IntelliJ, Netbeans, etc.

In order to pre-process the code, you need to download the pre-processor, as well as plugins for the various IDEs so that they are modified to accommodate these pre-processor annotations.

These downloads are from a non-official site, and are not part of any standard tool-chain.

For example, from the question we have the interface Action, and the class ActionImpl:

import java.util.Collection;

public interface Action<T> {

    Action<T> previous();

    T data();

    Collection<Action<T>> children();

    void children(Collection<Action<T>> children);

}

and

@Accessors(fluent = true, chain = false)
@Data()
@EqualsAndHashCode(of = "data")
@ToString(of = {"data"})
public class ActionImpl<T> implements Action<T> {

    private final Action<T> previous;
    private final T data;
    private Collection<Action<T>> children;

}

In Java terms, the ActionImpl class is missing four methods:

  • previous()
  • data()
  • children()
  • children(Collection<Action<T>>)

Additionally, there are compile/IDE errors for all the @Annotations which do not exist.

This makes the class fail to compile, and, essentially, there is nothing to review ;-)

##Question:

Is it working code, or is it off-topic?

In this Wolves, Goats and Cabbages in Java question (here is a link to the pre-edited version), Java code is presented to solve the problem.

The code requires pre-processing by a third-party tool in order to function.

The third-party tool adds a number of 'template' or 'boilerplate' methods that make the code complete. In Java terms, these are things like getters, setters, toString(), equals(), and hashCode().

Without pre-processing the code, it is:

  • full of errors, and will not compile.
  • comprehensively broken in 'standard' IDE's like Eclipse, IntelliJ, Netbeans, etc.

In order to pre-process the code, you need to download the pre-processor, as well as plugins for the various IDEs so that they are modified to accommodate these pre-processor annotations.

These downloads are from a non-official site, and are not part of any standard tool-chain.

For example, from the question we have the interface Action, and the class ActionImpl:

import java.util.Collection;

public interface Action<T> {

    Action<T> previous();

    T data();

    Collection<Action<T>> children();

    void children(Collection<Action<T>> children);

}

and

@Accessors(fluent = true, chain = false)
@Data()
@EqualsAndHashCode(of = "data")
@ToString(of = {"data"})
public class ActionImpl<T> implements Action<T> {

    private final Action<T> previous;
    private final T data;
    private Collection<Action<T>> children;

}

In Java terms, the ActionImpl class is missing four methods:

  • previous()
  • data()
  • children()
  • children(Collection<Action<T>>)

Additionally, there are compile/IDE errors for all the @Annotations which do not exist.

This makes the class fail to compile, and, essentially, there is nothing to review ;-)

##Question:

Is it working code, or is it off-topic?

added 11 characters in body; edited tags
Source Link
Jamal Mod
  • 35.2k
  • 2
  • 54
  • 106

In this Wolves, Goats and Cabbages in Java question (here is a link to the pre-edited version), Java code is presented to solve the problem.

The code requires pre-processing by a third-party tool in order to function.

The third-party tool adds a number of 'template' or 'boilerplate' methods that make the code complete. In Java terms, these are things like getters, setters, toString(), equals(), and hashCode().

Without pre-processing the code, it is:

  • full of errors, and will not compile.
  • comprehensively broken in 'standard' IDE's like Eclipse, IntelliJ, Netbeans, etc.

In order to pre-process the code, you need to download the pre-processor, as well as plugins for the various IDEs so that they are modified to accommodate these pre-processor annotations.

These downloads are from a non-official site, and are not part of any standard tool-chain.

For example, from the question we have the interface Action, and the class ActionImpl:

import java.util.Collection;

public interface Action<T> {

    Action<T> previous();

    T data();

    Collection<Action<T>> children();

    void children(Collection<Action<T>> children);

}

and

@Accessors(fluent = true, chain = false)
@Data()
@EqualsAndHashCode(of = "data")
@ToString(of = {"data"})
public class ActionImpl<T> implements Action<T> {

    private final Action<T> previous;
    private final T data;
    private Collection<Action<T>> children;

}

In Java terms, the ActionImpl class is missing four methods:

  • previous()previous()
  • data()data()
  • children()children()
  • children(Collection<Action)children(Collection<Action<T>>)

Additionally, there are compile/IDE errors for all the @Annotations which do not exist.

This makes the class fail to compile, and, essentially, there is nothing to review ;-)

##Question:

Is it working code, or is it off-topic?

In this Wolves, Goats and Cabbages in Java question (here is a link to the pre-edited version) Java code is presented to solve the problem.

The code requires pre-processing by a third-party tool in order to function.

The third-party tool adds a number of 'template' or 'boilerplate' methods that make the code complete. In Java terms, these are things like getters, setters, toString(), equals(), and hashCode().

Without pre-processing the code, it is:

  • full of errors, and will not compile.
  • comprehensively broken in 'standard' IDE's like Eclipse, IntelliJ, Netbeans, etc.

In order to pre-process the code, you need to download the pre-processor, as well as plugins for the various IDEs so that they are modified to accommodate these pre-processor annotations.

These downloads are from a non-official site, and are not part of any standard tool-chain.

For example, from the question we have the interface Action, and the class ActionImpl

import java.util.Collection;

public interface Action<T> {

    Action<T> previous();

    T data();

    Collection<Action<T>> children();

    void children(Collection<Action<T>> children);

}

and

@Accessors(fluent = true, chain = false)
@Data()
@EqualsAndHashCode(of = "data")
@ToString(of = {"data"})
public class ActionImpl<T> implements Action<T> {

    private final Action<T> previous;
    private final T data;
    private Collection<Action<T>> children;

}

In Java terms, the ActionImpl class is missing four methods:

  • previous()
  • data()
  • children()
  • children(Collection<Action)

Additionally, there are compile/IDE errors for all the @Annotations which do not exist.

This makes the class fail to compile, and, essentially, there is nothing to review ;-)

##Question:

Is it working code, or is it off-topic?

In this Wolves, Goats and Cabbages in Java question (here is a link to the pre-edited version), Java code is presented to solve the problem.

The code requires pre-processing by a third-party tool in order to function.

The third-party tool adds a number of 'template' or 'boilerplate' methods that make the code complete. In Java terms, these are things like getters, setters, toString(), equals(), and hashCode().

Without pre-processing the code, it is:

  • full of errors, and will not compile.
  • comprehensively broken in 'standard' IDE's like Eclipse, IntelliJ, Netbeans, etc.

In order to pre-process the code, you need to download the pre-processor, as well as plugins for the various IDEs so that they are modified to accommodate these pre-processor annotations.

These downloads are from a non-official site, and are not part of any standard tool-chain.

For example, from the question we have the interface Action, and the class ActionImpl:

import java.util.Collection;

public interface Action<T> {

    Action<T> previous();

    T data();

    Collection<Action<T>> children();

    void children(Collection<Action<T>> children);

}

and

@Accessors(fluent = true, chain = false)
@Data()
@EqualsAndHashCode(of = "data")
@ToString(of = {"data"})
public class ActionImpl<T> implements Action<T> {

    private final Action<T> previous;
    private final T data;
    private Collection<Action<T>> children;

}

In Java terms, the ActionImpl class is missing four methods:

  • previous()
  • data()
  • children()
  • children(Collection<Action<T>>)

Additionally, there are compile/IDE errors for all the @Annotations which do not exist.

This makes the class fail to compile, and, essentially, there is nothing to review ;-)

##Question:

Is it working code, or is it off-topic?

Tweeted twitter.com/#!/StackCodeReview/status/444197087295856640
added 4 characters in body
Source Link
konijn
  • 34.4k
  • 16
  • 21
Loading
Add link to pre-edited version
Source Link
rolfl
  • 98.1k
  • 4
  • 117
  • 238
Loading
Include example code
Source Link
rolfl
  • 98.1k
  • 4
  • 117
  • 238
Loading
edited tags
Link
Jamal Mod
  • 35.2k
  • 2
  • 54
  • 106
Loading
Source Link
rolfl
  • 98.1k
  • 4
  • 117
  • 238
Loading