|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Relation3<T1,T2,T3>
A set of triples representing a ternary relation. Relations can be viewed as generalizations of maps in which keys map to sets of values, and the mapping occurs in all directions.
| Method Summary | |
|---|---|
boolean |
add(T1 first,
T2 second,
T3 third)
Add Triple.make(first, second, third) to the set. |
boolean |
contains(T1 first,
T2 second,
T3 third)
Whether Triple.make(first, second, third) appears in the set. |
boolean |
containsFirst(T1 first)
Whether a triple with the given first value appears in the set. |
boolean |
containsSecond(T2 second)
Whether a triple with the given second value appears in the set. |
boolean |
containsThird(T3 third)
Whether a triple with the given third value appears in the set. |
Relation<T2,T3> |
excludeFirsts()
The set of (second, third) pairs for which there exists a (first, second, third) triple in the relation. |
Relation<T1,T3> |
excludeSeconds()
The set of (first, third) pairs for which there exists a (first, second, third) triple in the relation. |
Relation<T1,T2> |
excludeThirds()
The set of (first, second) pairs for which there exists a (first, second, third) triple in the relation. |
LambdaMap<T1,Relation<T2,T3>> |
firstMap()
A map view of the relation, mapping firsts to sets of (second, third) pairs. |
PredicateSet<T1> |
firstSet()
The set of firsts. |
Relation<T2,T3> |
matchFirst(T1 first)
The set of (second, third) pairs corresponding to a specific first. |
Relation<T1,T3> |
matchSecond(T2 second)
The set of (first, third) pairs corresponding to a specific second. |
Relation<T1,T2> |
matchThird(T3 third)
The set of (first, second) pairs corresponding to a specific third. |
boolean |
remove(T1 first,
T2 second,
T3 third)
Remove Triple.make(first, second, third) from the set. |
LambdaMap<T2,Relation<T1,T3>> |
secondMap()
A map view of the relation, mapping seconds to sets of (first, third) pairs. |
PredicateSet<T2> |
secondSet()
The set of seconds. |
LambdaMap<T3,Relation<T1,T2>> |
thirdMap()
A map view of the relation, mapping thirds to sets of (first, second) pairs. |
PredicateSet<T3> |
thirdSet()
The set of thirds. |
| Methods inherited from interface java.util.Set |
|---|
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
| Methods inherited from interface edu.rice.cs.plt.lambda.Predicate |
|---|
contains |
| Methods inherited from interface edu.rice.cs.plt.iter.SizedIterable |
|---|
hasFixedSize, isEmpty, isInfinite, isStatic, size, size |
| Method Detail |
|---|
boolean contains(T1 first,
T2 second,
T3 third)
Triple.make(first, second, third) appears in the set.
contains in interface Predicate3<T1,T2,T3>
boolean add(T1 first,
T2 second,
T3 third)
Triple.make(first, second, third) to the set.
boolean remove(T1 first,
T2 second,
T3 third)
Triple.make(first, second, third) from the set.
PredicateSet<T1> firstSet()
LambdaMap<T1,Relation<T2,T3>> firstMap()
boolean containsFirst(T1 first)
Relation<T2,T3> matchFirst(T1 first)
Relation<T2,T3> excludeFirsts()
PredicateSet<T2> secondSet()
LambdaMap<T2,Relation<T1,T3>> secondMap()
boolean containsSecond(T2 second)
Relation<T1,T3> matchSecond(T2 second)
Relation<T1,T3> excludeSeconds()
PredicateSet<T3> thirdSet()
LambdaMap<T3,Relation<T1,T2>> thirdMap()
boolean containsThird(T3 third)
Relation<T1,T2> matchThird(T3 third)
Relation<T1,T2> excludeThirds()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||