|
Copyright 2008 - 2010 Tony Morris, Runar Bjarnason, Tom Adams, Brad Clow, Ricky Clarkson, Nick Partridge, Jason Zaugg This software is released under an open source BSD licence. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectfj.Equal<A>
public final class Equal<A>
Tests for equality between two objects.
| Field Summary | |
|---|---|
static Equal<java.math.BigDecimal> |
bigdecimalEqual
An equal instance for the BigDecimal type. |
static Equal<java.math.BigInteger> |
bigintEqual
An equal instance for the BigInteger type. |
static Equal<java.lang.Boolean> |
booleanEqual
An equal instance for the boolean type. |
static Equal<java.lang.Byte> |
byteEqual
An equal instance for the byte type. |
static Equal<java.lang.Character> |
charEqual
An equal instance for the char type. |
static Equal<java.lang.Double> |
doubleEqual
An equal instance for the double type. |
static Equal<LazyString> |
eq
An equal instance for lazy strings. |
static Equal<java.lang.Float> |
floatEqual
An equal instance for the float type. |
static Equal<HList.HNil> |
hListEqual
An equal instance for the empty heterogeneous list. |
static Equal<java.lang.Integer> |
intEqual
An equal instance for the int type. |
static Equal<java.lang.Long> |
longEqual
An equal instance for the long type. |
static Equal<java.lang.Short> |
shortEqual
An equal instance for the short type. |
static Equal<java.lang.StringBuffer> |
stringBufferEqual
An equal instance for the StringBuffer type. |
static Equal<java.lang.StringBuilder> |
stringBuilderEqual
An equal instance for the StringBuilder type. |
static Equal<java.lang.String> |
stringEqual
An equal instance for the String type. |
| Method Summary | ||
|---|---|---|
static
|
anyEqual()
Returns an equal instance that uses the Object.equals(Object) method to test for
equality. |
|
static
|
arrayEqual(Equal<A> ea)
An equal instance for the Array type. |
|
|
comap(F<B,A> f)
Maps the given function across this equal as a contra-variant functor. |
|
static
|
eitherEqual(Equal<A> ea,
Equal<B> eb)
An equal instance for the Either type. |
|
F2<A,A,java.lang.Boolean> |
eq()
First-class equality check. |
|
F<A,java.lang.Boolean> |
eq(A a)
Partially applied equality check. |
|
boolean |
eq(A a1,
A a2)
Returns true if the two given arguments are equal, false otherwise. |
|
static
|
equal(F<A,F<A,java.lang.Boolean>> f)
Constructs an equal instance from the given function. |
|
static
|
hListEqual(Equal<E> e,
Equal<L> l)
An equal instance for heterogeneous lists. |
|
static
|
listEqual(Equal<A> ea)
An equal instance for the List type. |
|
static
|
nonEmptyListEqual(Equal<A> ea)
An equal instance for the NonEmptyList type. |
|
static
|
optionEqual(Equal<A> ea)
An equal instance for the Option type. |
|
static
|
p1Equal(Equal<A> ea)
An equal instance for a product-1. |
|
static
|
p2Equal(Equal<A> ea,
Equal<B> eb)
An equal instance for a product-2. |
|
static
|
p3Equal(Equal<A> ea,
Equal<B> eb,
Equal<C> ec)
An equal instance for a product-3. |
|
static
|
p4Equal(Equal<A> ea,
Equal<B> eb,
Equal<C> ec,
Equal<D> ed)
An equal instance for a product-4. |
|
static
|
p5Equal(Equal<A> ea,
Equal<B> eb,
Equal<C> ec,
Equal<D> ed,
Equal<E> ee)
An equal instance for a product-5. |
|
static
|
p6Equal(Equal<A> ea,
Equal<B> eb,
Equal<C> ec,
Equal<D> ed,
Equal<E> ee,
Equal<F$> ef)
An equal instance for a product-6. |
|
static
|
p7Equal(Equal<A> ea,
Equal<B> eb,
Equal<C> ec,
Equal<D> ed,
Equal<E> ee,
Equal<F$> ef,
Equal<G> eg)
An equal instance for a product-7. |
|
static
|
p8Equal(Equal<A> ea,
Equal<B> eb,
Equal<C> ec,
Equal<D> ed,
Equal<E> ee,
Equal<F$> ef,
Equal<G> eg,
Equal<H> eh)
An equal instance for a product-8. |
|
static
|
setEqual(Equal<A> e)
Equal instance for sets. |
|
static
|
streamEqual(Equal<A> ea)
An equal instance for the Stream type. |
|
static
|
treeEqual(Equal<A> ea)
An equal instance for the Tree type. |
|
static
|
v2Equal(Equal<A> ea)
An equal instance for a vector-2. |
|
static
|
v3Equal(Equal<A> ea)
An equal instance for a vector-3. |
|
static
|
v4Equal(Equal<A> ea)
An equal instance for a vector-4. |
|
static
|
v5Equal(Equal<A> ea)
An equal instance for a vector-5. |
|
static
|
v6Equal(Equal<A> ea)
An equal instance for a vector-6. |
|
static
|
v7Equal(Equal<A> ea)
An equal instance for a vector-7. |
|
static
|
v8Equal(Equal<A> ea)
An equal instance for a vector-8. |
|
static
|
validationEqual(Equal<A> ea,
Equal<B> eb)
An equal instance for the Validation type. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final Equal<java.lang.Boolean> booleanEqual
boolean type.
public static final Equal<java.lang.Byte> byteEqual
byte type.
public static final Equal<java.lang.Character> charEqual
char type.
public static final Equal<java.lang.Double> doubleEqual
double type.
public static final Equal<java.lang.Float> floatEqual
float type.
public static final Equal<java.lang.Integer> intEqual
int type.
public static final Equal<java.math.BigInteger> bigintEqual
BigInteger type.
public static final Equal<java.math.BigDecimal> bigdecimalEqual
BigDecimal type.
public static final Equal<java.lang.Long> longEqual
long type.
public static final Equal<java.lang.Short> shortEqual
short type.
public static final Equal<java.lang.String> stringEqual
String type.
public static final Equal<java.lang.StringBuffer> stringBufferEqual
StringBuffer type.
public static final Equal<java.lang.StringBuilder> stringBuilderEqual
StringBuilder type.
public static final Equal<LazyString> eq
public static final Equal<HList.HNil> hListEqual
| Method Detail |
|---|
public boolean eq(A a1,
A a2)
true if the two given arguments are equal, false otherwise.
a1 - An object to test for equality against another.a2 - An object to test for equality against another.
true if the two given arguments are equal, false otherwise.public F2<A,A,java.lang.Boolean> eq()
true if the two given arguments are equal.public F<A,java.lang.Boolean> eq(A a)
a - An object to test for equality against another.
true if the given argument equals the argument to this method.public <B> Equal<B> comap(F<B,A> f)
f - The function to map.
public static <A> Equal<A> equal(F<A,F<A,java.lang.Boolean>> f)
f - The function to construct the equal with.
public static <A> Equal<A> anyEqual()
Object.equals(Object) method to test for
equality.
Object.equals(Object) method to test for
equality.
public static <A,B> Equal<Either<A,B>> eitherEqual(Equal<A> ea,
Equal<B> eb)
Either type.
ea - Equality across the left side of Either.eb - Equality across the right side of Either.
Either type.
public static <A,B> Equal<Validation<A,B>> validationEqual(Equal<A> ea,
Equal<B> eb)
Validation type.
ea - Equality across the failing side of Validation.eb - Equality across the succeeding side of Validation.
Validation type.public static <A> Equal<List<A>> listEqual(Equal<A> ea)
List type.
ea - Equality across the elements of the list.
List type.public static <A> Equal<NonEmptyList<A>> nonEmptyListEqual(Equal<A> ea)
NonEmptyList type.
ea - Equality across the elements of the non-empty list.
NonEmptyList type.public static <A> Equal<Option<A>> optionEqual(Equal<A> ea)
Option type.
ea - Equality across the element of the option.
Option type.public static <A> Equal<Stream<A>> streamEqual(Equal<A> ea)
Stream type.
ea - Equality across the elements of the stream.
Stream type.public static <A> Equal<Array<A>> arrayEqual(Equal<A> ea)
Array type.
ea - Equality across the elements of the array.
Array type.public static <A> Equal<Tree<A>> treeEqual(Equal<A> ea)
Tree type.
ea - Equality across the elements of the tree.
Tree type.public static <A> Equal<P1<A>> p1Equal(Equal<A> ea)
ea - Equality across the first element of the product.
public static <A,B> Equal<P2<A,B>> p2Equal(Equal<A> ea,
Equal<B> eb)
ea - Equality across the first element of the product.eb - Equality across the second element of the product.
public static <A,B,C> Equal<P3<A,B,C>> p3Equal(Equal<A> ea,
Equal<B> eb,
Equal<C> ec)
ea - Equality across the first element of the product.eb - Equality across the second element of the product.ec - Equality across the third element of the product.
public static <A,B,C,D> Equal<P4<A,B,C,D>> p4Equal(Equal<A> ea,
Equal<B> eb,
Equal<C> ec,
Equal<D> ed)
ea - Equality across the first element of the product.eb - Equality across the second element of the product.ec - Equality across the third element of the product.ed - Equality across the fourth element of the product.
public static <A,B,C,D,E> Equal<P5<A,B,C,D,E>> p5Equal(Equal<A> ea,
Equal<B> eb,
Equal<C> ec,
Equal<D> ed,
Equal<E> ee)
ea - Equality across the first element of the product.eb - Equality across the second element of the product.ec - Equality across the third element of the product.ed - Equality across the fourth element of the product.ee - Equality across the fifth element of the product.
public static <A,B,C,D,E,F$> Equal<P6<A,B,C,D,E,F$>> p6Equal(Equal<A> ea,
Equal<B> eb,
Equal<C> ec,
Equal<D> ed,
Equal<E> ee,
Equal<F$> ef)
ea - Equality across the first element of the product.eb - Equality across the second element of the product.ec - Equality across the third element of the product.ed - Equality across the fourth element of the product.ee - Equality across the fifth element of the product.ef - Equality across the sixth element of the product.
public static <A,B,C,D,E,F$,G> Equal<P7<A,B,C,D,E,F$,G>> p7Equal(Equal<A> ea,
Equal<B> eb,
Equal<C> ec,
Equal<D> ed,
Equal<E> ee,
Equal<F$> ef,
Equal<G> eg)
ea - Equality across the first element of the product.eb - Equality across the second element of the product.ec - Equality across the third element of the product.ed - Equality across the fourth element of the product.ee - Equality across the fifth element of the product.ef - Equality across the sixth element of the product.eg - Equality across the seventh element of the product.
public static <A,B,C,D,E,F$,G,H> Equal<P8<A,B,C,D,E,F$,G,H>> p8Equal(Equal<A> ea,
Equal<B> eb,
Equal<C> ec,
Equal<D> ed,
Equal<E> ee,
Equal<F$> ef,
Equal<G> eg,
Equal<H> eh)
ea - Equality across the first element of the product.eb - Equality across the second element of the product.ec - Equality across the third element of the product.ed - Equality across the fourth element of the product.ee - Equality across the fifth element of the product.ef - Equality across the sixth element of the product.eg - Equality across the seventh element of the product.eh - Equality across the eighth element of the product.
public static <A> Equal<V2<A>> v2Equal(Equal<A> ea)
ea - Equality across the elements of the vector.
public static <A> Equal<V3<A>> v3Equal(Equal<A> ea)
ea - Equality across the elements of the vector.
public static <A> Equal<V4<A>> v4Equal(Equal<A> ea)
ea - Equality across the elements of the vector.
public static <A> Equal<V5<A>> v5Equal(Equal<A> ea)
ea - Equality across the elements of the vector.
public static <A> Equal<V6<A>> v6Equal(Equal<A> ea)
ea - Equality across the elements of the vector.
public static <A> Equal<V7<A>> v7Equal(Equal<A> ea)
ea - Equality across the elements of the vector.
public static <A> Equal<V8<A>> v8Equal(Equal<A> ea)
ea - Equality across the elements of the vector.
public static <E,L extends HList<L>> Equal<HList.HCons<E,L>> hListEqual(Equal<E> e,
Equal<L> l)
e - Equality for the first element of the list.l - Equality for the rest of the list.
public static <A> Equal<Set<A>> setEqual(Equal<A> e)
e - Equality for the set elements.
|
Copyright 2008 - 2010 Tony Morris, Runar Bjarnason, Tom Adams, Brad Clow, Ricky Clarkson, Nick Partridge, Jason Zaugg This software is released under an open source BSD licence. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||