|
ref_send API 2.17 defensive programming in Java |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.ref_send.brand.Brand<T>
T
- purpose of this brandpublic class Brand<T>
An opaque, globally unique identifier.
Method Summary | ||
---|---|---|
static
|
equal(P a,
P b)
Is one object equal to another? |
|
static
|
make()
Constructs an instance. |
|
static
|
require(Brand<T> expected,
Brand<T> actual)
Requires that one brand is the same as another. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static <T> Brand<T> make()
T
- purpose of this brandpublic static <P> boolean equal(P a, P b)
equal
to another?
P
- compared object typea
- object compared againstb
- object compared to
true
if a
claims b
is
equal
, else false
public static <T> void require(Brand<T> expected, Brand<T> actual) throws WrongBrand
T
- purpose of this brandexpected
- brand compared againstactual
- brand compared to
WrongBrand
- actual
is not expected
|
ref_send API 2.17 defensive programming in Java |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 1998-2009 Waterken Inc. under the terms of the MIT X license.