E
- value typepublic final class QuaternaryVennModelImpl<E> extends Object implements QuaternaryVennModel<E>
Constructor and Description |
---|
QuaternaryVennModelImpl()
Create a new empty quaternary venn model.
|
QuaternaryVennModelImpl(Set<? extends E> first,
Set<? extends E> second,
Set<? extends E> third,
Set<? extends E> fourth)
Create a new quaternary venn model with the specified sets.
|
Modifier and Type | Method and Description |
---|---|
Set<E> |
exclusiveTo(int index,
int... additional)
Return an immutable set view of the elements exclusive to the sets in this venn model
identified by the specified indices.
|
ObservableSet<E> |
first()
Return a mutable observable view of the first set for
this quaternary venn model.
|
Set<E> |
firstFourth()
Return an immutable view of the elements unique to the intersection
of the first and fourth sets for this quaternary venn model.
|
Set<E> |
firstOnly()
Return an immutable view of the elements unique to the first
set for this quaternary venn model.
|
Set<E> |
firstSecond()
Return an immutable view of the elements unique to the intersection
of the first and second sets for this quaternary venn model.
|
Set<E> |
firstSecondFourth()
Return an immutable view of the elements unique to the intersection
of the first, second, and fourth sets for this quaternary venn model.
|
Set<E> |
firstSecondThird()
Return an immutable view of the elements unique to the intersection
of the first, second, and third sets for this quaternary venn model.
|
Set<E> |
firstThird()
Return an immutable view of the elements unique to the intersection
of the first and third sets for this quaternary venn model.
|
Set<E> |
firstThirdFourth()
Return an immutable view of the elements unique to the intersection
of the first, third, and fourth sets for this quaternary venn model.
|
ObservableSet<E> |
fourth()
Return a mutable observable view of the fourth set for
this quaternary venn model.
|
Set<E> |
fourthOnly()
Return an immutable view of the elements unique to the fourth
set for this quaternary venn model.
|
Set<E> |
get(int index)
Return the set at the specified index in this venn model.
|
Set<E> |
intersection()
Return an immutable view of the intersection of the first, second, third, and fourth
sets for this quaternary venn model.
|
ObservableSet<E> |
second()
Return a mutable observable view of the second set for
this quaternary venn model.
|
Set<E> |
secondFourth()
Return an immutable view of the elements unique to the intersection
of the second and fourth sets for this quaternary venn model.
|
Set<E> |
secondOnly()
Return an immutable view of the elements unique to the second
set for this quaternary venn model.
|
Set<E> |
secondThird()
Return an immutable view of the elements unique to the intersection
of the second and third sets for this quaternary venn model.
|
Set<E> |
secondThirdFourth()
Return an immutable view of the elements unique to the intersection
of the second, third, and fourth sets for this quaternary venn model.
|
ObservableSet<E> |
selection()
Return a mutable observable view of the selection for this
quaternary venn model.
|
int |
size()
Return the number of sets in this venn model.
|
ObservableSet<E> |
third()
Return a mutable observable view of the third set for
this quaternary venn model.
|
Set<E> |
thirdFourth()
Return an immutable view of the elements unique to the intersection
of the third and fourth sets for this quaternary venn model.
|
Set<E> |
thirdOnly()
Return an immutable view of the elements unique to the third
set for this quaternary venn model.
|
Set<E> |
union()
Return an immutable view of the union of the first, second, third, and fourth
sets for this quaternary venn model.
|
public QuaternaryVennModelImpl()
public QuaternaryVennModelImpl(Set<? extends E> first, Set<? extends E> second, Set<? extends E> third, Set<? extends E> fourth)
first
- first set, must not be nullsecond
- second set, must not be nullthird
- third set, must not be nullfourth
- fourth set, must not be nullpublic int size()
public ObservableSet<E> first()
first
in interface QuaternaryVennModel<E>
public ObservableSet<E> second()
second
in interface QuaternaryVennModel<E>
public ObservableSet<E> third()
third
in interface QuaternaryVennModel<E>
public ObservableSet<E> fourth()
fourth
in interface QuaternaryVennModel<E>
public Set<E> firstOnly()
QuaternaryVennModel.first()
,
QuaternaryVennModel.second()
, QuaternaryVennModel.third()
, and QuaternaryVennModel.fourth()
).firstOnly
in interface QuaternaryVennModel<E>
public Set<E> secondOnly()
QuaternaryVennModel.first()
,
QuaternaryVennModel.second()
, QuaternaryVennModel.third()
, and QuaternaryVennModel.fourth()
).secondOnly
in interface QuaternaryVennModel<E>
public Set<E> thirdOnly()
QuaternaryVennModel.first()
,
QuaternaryVennModel.second()
, QuaternaryVennModel.third()
, and QuaternaryVennModel.fourth()
).thirdOnly
in interface QuaternaryVennModel<E>
public Set<E> fourthOnly()
QuaternaryVennModel.first()
,
QuaternaryVennModel.second()
, QuaternaryVennModel.third()
, and QuaternaryVennModel.fourth()
).fourthOnly
in interface QuaternaryVennModel<E>
public Set<E> firstSecond()
QuaternaryVennModel.first()
, QuaternaryVennModel.second()
, QuaternaryVennModel.third()
, and QuaternaryVennModel.fourth()
).firstSecond
in interface QuaternaryVennModel<E>
public Set<E> firstThird()
QuaternaryVennModel.first()
, QuaternaryVennModel.second()
, QuaternaryVennModel.third()
, and QuaternaryVennModel.fourth()
).firstThird
in interface QuaternaryVennModel<E>
public Set<E> firstFourth()
QuaternaryVennModel.first()
, QuaternaryVennModel.second()
, QuaternaryVennModel.third()
, and QuaternaryVennModel.fourth()
).firstFourth
in interface QuaternaryVennModel<E>
public Set<E> secondThird()
QuaternaryVennModel.first()
, QuaternaryVennModel.second()
, QuaternaryVennModel.third()
, and QuaternaryVennModel.fourth()
).secondThird
in interface QuaternaryVennModel<E>
public Set<E> secondFourth()
QuaternaryVennModel.first()
, QuaternaryVennModel.second()
, QuaternaryVennModel.third()
, and QuaternaryVennModel.fourth()
).secondFourth
in interface QuaternaryVennModel<E>
public Set<E> thirdFourth()
QuaternaryVennModel.first()
, QuaternaryVennModel.second()
, QuaternaryVennModel.third()
, and QuaternaryVennModel.fourth()
).thirdFourth
in interface QuaternaryVennModel<E>
public Set<E> firstSecondThird()
QuaternaryVennModel.first()
, QuaternaryVennModel.second()
, QuaternaryVennModel.third()
, and QuaternaryVennModel.fourth()
).firstSecondThird
in interface QuaternaryVennModel<E>
public Set<E> firstSecondFourth()
QuaternaryVennModel.first()
, QuaternaryVennModel.second()
, QuaternaryVennModel.third()
, and QuaternaryVennModel.fourth()
).firstSecondFourth
in interface QuaternaryVennModel<E>
public Set<E> firstThirdFourth()
QuaternaryVennModel.first()
, QuaternaryVennModel.second()
, QuaternaryVennModel.third()
, and QuaternaryVennModel.fourth()
).firstThirdFourth
in interface QuaternaryVennModel<E>
public Set<E> secondThirdFourth()
QuaternaryVennModel.first()
, QuaternaryVennModel.second()
, QuaternaryVennModel.third()
, and QuaternaryVennModel.fourth()
).secondThirdFourth
in interface QuaternaryVennModel<E>
public Set<E> intersection()
QuaternaryVennModel.first()
,
QuaternaryVennModel.second()
, QuaternaryVennModel.third()
, and QuaternaryVennModel.fourth()
).intersection
in interface QuaternaryVennModel<E>
intersection
in interface VennModel<E>
public Set<E> exclusiveTo(int index, int... additional)
n = 3
VennModel<String> vennModel = ...; Set<String> first = vennModel.get(0); Set<String> second = vennModel.get(1); Set<String> third = vennModel.get(2); Set<String> firstOnly = vennModel.exclusiveTo(0); Set<String> firstSecond = vennModel.exclusiveTo(0, 1); Set<String> intersection = vennModel.exclusiveTo(0, 1, 2);
This is equivalent to the difference of the intersection of the sets in this venn model identified by the specified indices and the union of the remainder sets in this venn model.
exclusiveTo
in interface VennModel<E>
index
- first indexadditional
- variable number of additional indices, if anypublic Set<E> union()
QuaternaryVennModel.first()
,
QuaternaryVennModel.second()
, QuaternaryVennModel.third()
, and QuaternaryVennModel.fourth()
).public ObservableSet<E> selection()
QuaternaryVennModel.first()
,
QuaternaryVennModel.second()
, QuaternaryVennModel.third()
, and QuaternaryVennModel.fourth()
), and may
not contain any elements not present in the union (QuaternaryVennModel.union()
).selection
in interface QuaternaryVennModel<E>
Copyright (c) 2009-2013 held jointly by the individual authors. Licensed under the GNU Lesser General Public License (LGPL).