public abstract class AbstractAcceptance extends Object implements DockAcceptance
true
for all cases.Constructor and Description |
---|
AbstractAcceptance() |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(DockStation parent,
Dockable child)
Tells whether or not
child is allowed to become a
real child of parent . |
boolean |
accept(DockStation parent,
Dockable child,
Dockable next)
Tells whether
child , which may be already a child of
parent , and next are allowed to be combined. |
DockAcceptance |
andAccept(DockAcceptance other)
Combines this acceptance with the
other acceptance. |
DockAcceptance |
equalAccept(DockAcceptance other)
Combines this acceptance with the
other acceptance
in a logical "<->" operation. |
DockAcceptance |
impliedAccept(DockAcceptance other)
Combines this acceptance with the
other acceptance
such that the result is a logical implication of the form
"other -> this". |
DockAcceptance |
impliesAccept(DockAcceptance other)
Combines this acceptance with the
other acceptance
such that the result is a logical implication of the form
"this -> other" |
DockAcceptance |
orAccept(DockAcceptance other)
Combines this acceptance with the
other acceptance in
a logical "OR" operation. |
DockAcceptance |
xorAccept(DockAcceptance other)
Combines this acceptance with the
other acceptance
in a logical "XOR" relation. |
public boolean accept(DockStation parent, Dockable child)
DockAcceptance
child
is allowed to become a
real child of parent
.accept
in interface DockAcceptance
parent
- the future parentchild
- the future childchild
and parent
are allowed to be combinedpublic boolean accept(DockStation parent, Dockable child, Dockable next)
DockAcceptance
child
, which may be already a child of
parent
, and next
are allowed to be combined.
The result of this combination would replace child
on parent
.accept
in interface DockAcceptance
parent
- the future parent of the combinationchild
- a Dockable which may be a child of parentnext
- a new Dockablepublic DockAcceptance andAccept(DockAcceptance other)
other
acceptance. The new acceptance
returns true
only if this and the other
acceptance return true
other
- A second acceptancepublic DockAcceptance orAccept(DockAcceptance other)
other
acceptance in
a logical "OR" operation.other
- The other acceptancetrue
if this or
the other
acceptance returns true
public DockAcceptance xorAccept(DockAcceptance other)
other
acceptance
in a logical "XOR" relation.other
- The other acceptancetrue
only if
one of this and other
returned true
,
and the other one returned false
public DockAcceptance equalAccept(DockAcceptance other)
other
acceptance
in a logical "<->" operation.other
- The other acceptancetrue
if
this and the other
acceptance returned the
same value.public DockAcceptance impliesAccept(DockAcceptance other)
other
acceptance
such that the result is a logical implication of the form
"this -> other"other
- The other acceptancetrue
if this
acceptance returned false
or if the other
acceptance returned true
public DockAcceptance impliedAccept(DockAcceptance other)
other
acceptance
such that the result is a logical implication of the form
"other -> this".other
- The other acceptancetrue
if
this acceptance returned true
or if the
other
acceptance returned false