My favorites
|
Sign in
pluralism
Modular object protocol checking for Java
Project Home
Downloads
Wiki
Issues
Source
Checkout
|
Browse
|
Changes
|
r445
Source path:
svn
/
trunk
/
PluralTestsAndExamples
/
src
/
edu
/
cmu
/
cs
/
plural
/
util
/
Lambda2.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/**
* Copyright (C) 2007, 2008 Carnegie Mellon University and others.
*
* This file is part of Plural.
*
* Plural is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* Plural is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Plural; if not, see <http://www.gnu.org/licenses>.
*
* Linking Plural statically or dynamically with other modules is
* making a combined work based on Plural. Thus, the terms and
* conditions of the GNU General Public License cover the whole
* combination.
*
* In addition, as a special exception, the copyright holders of Plural
* give you permission to combine Plural with free software programs or
* libraries that are released under the GNU LGPL and with code
* included in the standard release of Eclipse under the Eclipse Public
* License (or modified versions of such code, with unchanged license).
* You may copy and distribute such a system following the terms of the
* GNU GPL for Plural and the licenses of the other code concerned.
*
* Note that people who make modified versions of Plural are not
* obligated to grant this special exception for their modified
* versions; it is their choice whether to do so. The GNU General
* Public License gives permission to release a modified version
* without this exception; this exception also makes it possible to
* release a modified version which carries forward this exception.
*/
package edu.cmu.cs.plural.util;
import edu.cmu.cs.plural.annot.Perm;
import edu.cmu.cs.plural.annot.Pure;
/**
* A 'lambda,' or first-class function, that takes two arguments and
* returns one argument.
*
* @author Nels E. Beckman
* @since Sep 9, 2008
*
* @param <I1> The type of the first argument.
* @param <I2> The type of the second argument.
* @param <O> The type of the output.
*/
public interface Lambda2<I1, I2, O> {
@Perm(requires="pure(this) * immutable(#0) * immutable(#1)",
ensures="pure(this) * immutable(result)")
public O call(@Pure(returned=false) I1 i1, @Pure(returned=false) I2 i2);
}
Show details
Hide details
Change log
r49
by nels.beckman on Sep 17, 2008
Diff
[No log message]
Go to:
...luralTestsAndExamples/.classpath
.../PluralTestsAndExamples/.project
/trunk/PluralTestsAndExamples/src
...k/PluralTestsAndExamples/src/edu
...uralTestsAndExamples/src/edu/cmu
...lTestsAndExamples/src/edu/cmu/cs
...AndExamples/src/edu/cmu/cs/nimby
...amples/src/edu/cmu/cs/nimby/test
...src/edu/cmu/cs/nimby/test/oopsla
...imby/test/oopsla/CausalDemo.java
...u/cs/nimby/test/oopsla/Chat.java
.../nimby/test/oopsla/JChannel.java
...est/oopsla/RequestProcessor.java
...t/oopsla/ReservationManager.java
...src/edu/cmu/cs/nimby/test/simple
.../cmu/cs/nimby/test/simple/client
...client/PureSubtractNoAtomic.java
...lient/ShareSubtractNoAtomic.java
...e/client/SimpleFullNoAtomic.java
...ent/SimpleImmutableNoAtomic.java
...ple/client/SimplePureAtomic.java
...e/client/SimplePureNoAtomic.java
...le/client/SimpleShareAtomic.java
.../client/SimpleShareNoAtomic.java
...client/SimpleUniqueNoAtomic.java
.../client/SourceVariablesOkay.java
...mu/cs/nimby/test/simple/provider
.../simple/provider/FullUnpack.java
...e/provider/FullUnpackAtomic.java
...le/provider/ImmutableUnpack.java
.../simple/provider/PureUnpack.java
...e/provider/PureUnpackAtomic.java
...simple/provider/ShareUnpack.java
.../provider/ShareUnpackAtomic.java
...le/provider/TwoAtomicBlocks.java
...imple/provider/UniqueUnpack.java
...ndExamples/src/edu/cmu/cs/plural
...mples/src/edu/cmu/cs/plural/test
...s/plural/test/ArrayIterator.java
.../plural/test/BufferedStream.java
...mu/cs/plural/test/CasesTest.java
...edu/cmu/cs/plural/test/Chat.java
...cs/plural/test/FractionTest.java
...u/cmu/cs/plural/test/GCTest.java
.../plural/test/HuffmanDecoder.java
...lural/test/ImplicationWorks.java
...u/cs/plural/test/Issue6Test.java
...u/cs/plural/test/Issue8Test.java
...ural/test/ModifyingIterator.java
.../plural/test/PermsDontParse.java
Project members,
sign in
to write a code review
Older revisions
All revisions of this file
File info
Size: 2465 bytes, 60 lines
View raw file
Hosted by