[
https://issues.apache.org/jira/browse/LANG-740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14528976#comment-14528976
]
ASF GitHub Bot commented on LANG-740:
-------------------------------------
Github user britter commented on a diff in the pull request:
https://github.com/apache/commons-lang/pull/80#discussion_r29696821
--- Diff: src/main/java/org/apache/commons/lang3/concurrent/Computable.java
---
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.lang3.concurrent;
+
+/**
+ * <p>Definition of an interface for a wrapper around a calculation that
takes a single parameter and returns a result.</p>
+ * <p/>
+ * <p>This interface allows for wrapping a calculation into a class so
that it maybe passed around an application.</p>
+ *
+ * @param <A> the type of the input to the calculation
+ * @param <V> the type of the output of the calculation
+ */
+public interface Computable<A, V> {
+
+ /**
--- End diff --
Please only use spaces for indentation
> Add a Memoizer class
> --------------------
>
> Key: LANG-740
> URL: https://issues.apache.org/jira/browse/LANG-740
> Project: Commons Lang
> Issue Type: New Feature
> Components: lang.concurrent.*
> Reporter: Gary Gregory
> Assignee: Gary Gregory
> Fix For: Review Patch, 3.5
>
> Attachments: LANG-740.patch
>
>
> I am currently using a class like the Memoizer class [1] from "Java
> Concurrency in Practice" [2], a great book.
> It would fit perfectly in org.apache.commons.lang3.concurrent.
> [1] http://jcip.net/listings/Memoizer.java
> [2] http://jcip.net/
> There is no licensing issue because the code is in the public domain:
> {noformat}
> ---------- Forwarded message ----------
> From: Brian Goetz <[email protected]>
> Date: Tue, Aug 9, 2011 at 5:40 PM
> Subject: Re: Apache Commons Lang and Memoizer
> To: Gary Gregory <[email protected]>, Tim Peierls <[email protected]>
> No license issues -- the code is in the public domain:
> Written by Brian Goetz and Tim Peierls with assistance from members of
> JCP JSR-166 Expert Group and released to the public domain, as explained at
> http://creativecommons.org/licenses/publicdomain
> Code for the samples can be downloaded from http://www.jcip.net/listings.html.
> Cheers,
> -Brian
> On 8/9/2011 5:38 PM, Gary Gregory wrote:
> >
> > Hi Brian,
> >
> > I would like to include a Memoizer in the next release of Apache
> > Commons Lang [1].
> >
> > Can we use the Memoizer pattern from "Java Concurrency in Practice"? I
> > think I would reuse the code from the class Memoizer and change names,
> > things like that.
> >
> > We are talking about this on the Lang mailing list and are wondering
> > if there are any licensing issues.
> >
> > [1] https://commons.apache.org/lang/
> >
> --
> Thank you,
> Gary
> http://garygregory.wordpress.com/
> http://garygregory.com/
> http://people.apache.org/~ggregory/
> http://twitter.com/GaryGregory
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)