Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Annotate Functional Interface #606

Merged
merged 3 commits into from
Mar 14, 2018
Merged

Conversation

QubitPi
Copy link
Contributor

@QubitPi QubitPi commented Dec 22, 2017

Add @FunctionalInterface annotation to all functional interfaces.

It is not mandatory to use it, but it is best practice to use it with functional interface to avoid addition of extra methods accidentally. If the interface is annotated with @FunctionalInterface annotation and we try to have more than one abstract method, it throws compiler error.

The major benefit of functional interface is that we can use lambda expressions to instantiate them and avoid using bulky anonymous class implementation. Since there is only one abstract function in the functional interfaces, there is no confusion in applying the lambda expression to the method.

@QubitPi QubitPi changed the title Annotate FunctionalInterface Annotate Functional Interface Dec 22, 2017
Copy link
Collaborator

@tarrantzhang tarrantzhang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might wan to add these interface as well: JobRowBuilder, ConfigPhysicalTable, TaggedDimensionField, ExtractionFunctionDimension, isTableAligned, QuerySigningService`

@QubitPi QubitPi force-pushed the annotate-functional-interface branch from b667472 to 7124c39 Compare January 30, 2018 01:55
@QubitPi
Copy link
Contributor Author

QubitPi commented Jan 30, 2018

@tarrantzhang Thank you! I've added to them all except for ConfigPhysicalTable, TaggedDimensionField, and ExtractionFunctionDimension. They are actually not functional interface(because they extend non-functional interfaces)

@cdeszaq
Copy link
Collaborator

cdeszaq commented Mar 9, 2018

@QubitPi I think this just needs a little bit of manual intervention to resolve the conflicts and it should be ready to merge.

@QubitPi
Copy link
Contributor Author

QubitPi commented Mar 9, 2018

@cdeszaq Thanks for the approval! I'm not able to see where conflicts are. Could you point me to the conflict location?

@QubitPi QubitPi force-pushed the annotate-functional-interface branch from 61ba5ca to ee20bdd Compare March 14, 2018 07:09
@QubitPi
Copy link
Contributor Author

QubitPi commented Mar 14, 2018

@cdeszaq I think all conflicts are resolved 😃

@QubitPi QubitPi merged commit 289994a into master Mar 14, 2018
@QubitPi QubitPi deleted the annotate-functional-interface branch March 14, 2018 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants