class Constraint extends Object
Modifier | Constructor and Description |
---|---|
private |
Constraint()
Non-instantiable.
|
Modifier and Type | Method and Description |
---|---|
(package private) static boolean |
contains(Object[] arr,
int i,
Object obj)
Returns true if the non-null object is equal to any of the elements
of the array with index less than i.
|
(package private) static boolean |
equal(Object[] arr1,
Object[] arr2)
Returns true if the two arrays are the same length and contain equal
elements (but the order of the elements need not be the same in both
arrays).
|
(package private) static int |
hash(Object[] elements)
Returns the sum of the hash codes of all elements of the given array.
|
(package private) static Class[] |
reduce(Class[] classes,
boolean keepSupers)
Verifies that there is at least one element, and returns a new array
of the elements, in arbitrary order, with redundant classes removed as
follows.
|
(package private) static Principal[] |
reduce(Collection c)
Verifies that all elements of the collection are instances of principal
classes, and that there is at least one element, and returns an array
of the elements, in arbitrary order, with duplicates removed.
|
(package private) static Class[] |
reduce(Collection c,
boolean keepSupers)
Verifies that all elements of the collection are classes, and that
there is at least one element, and returns an array of the elements,
in arbitrary order, with redundant classes removed as follows.
|
(package private) static Principal[] |
reduce(Principal[] principals)
Verifies that there is at least one element, and returns a new array of
the elements, in arbitrary order, with duplicates removed.
|
private static Class[] |
reduce0(Class[] classes,
boolean keepSupers)
Verifies that there is at least one element, and returns an array
of the elements, in arbitrary order, with redundant classes removed as
follows.
|
private static Principal[] |
reduce0(Principal[] principals)
Verifies that there is at least one element, and returns an array of
the elements, in arbitrary order, with duplicates removed.
|
(package private) static String |
toString(Object[] a)
Returns a sorted comma-separated list of the toString form of the
elements of the array.
|
(package private) static Object[] |
trim(Object[] elements,
int len)
Returns an array containing the first len elements of the specified
array, with the same element type as the specified array.
|
(package private) static void |
verify(Class c)
Verifies that the class is not a primitive or array class, and
either isn't final or is assignable to Principal.
|
(package private) static void |
verify(Class[] classes)
Verifies that there is at least one element, that they are all
valid classes, and that no class is assignable to any other class.
|
(package private) static void |
verify(Principal[] principals)
Verifies that there is at least one element, and that there are no
duplicates;
|
static Object[] trim(Object[] elements, int len)
static int hash(Object[] elements)
static boolean equal(Object[] arr1, Object[] arr2)
static boolean contains(Object[] arr, int i, Object obj)
static String toString(Object[] a)
static Principal[] reduce(Collection c)
static Principal[] reduce(Principal[] principals)
private static Principal[] reduce0(Principal[] principals)
static void verify(Principal[] principals) throws InvalidObjectException
InvalidObjectException
static Class[] reduce(Collection c, boolean keepSupers)
static Class[] reduce(Class[] classes, boolean keepSupers)
private static Class[] reduce0(Class[] classes, boolean keepSupers)
static void verify(Class c)
static void verify(Class[] classes) throws InvalidObjectException
InvalidObjectException
Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.