/** @since 0.17 or earlier */ @Override public Object getMutex() { return getRoot(); }
/** @since 0.17 or earlier */ @Override public Object getMutex() { return getRoot(); }
@Override public Object getMutex() { return getRoot(); }
/** * Are these two shapes related, i.e. do they have the same root? * * @param other Shape to compare to * @return true if one shape is an upcast of the other, or the Shapes are equal * @since 0.17 or earlier */ @Override public boolean isRelated(Shape other) { if (this == other) { return true; } if (this.getRoot() == getRoot()) { return true; } return false; }
/** * Are these two shapes related, i.e. do they have the same root? * * @param other Shape to compare to * @return true if one shape is an upcast of the other, or the Shapes are equal */ @Override public boolean isRelated(Shape other) { if (this == other) { return true; } if (this.getRoot() == getRoot()) { return true; } return false; }
/** * Are these two shapes related, i.e. do they have the same root? * * @param other Shape to compare to * @return true if one shape is an upcast of the other, or the Shapes are equal * @since 0.17 or earlier */ @Override public boolean isRelated(Shape other) { if (this == other) { return true; } if (this.getRoot() == getRoot()) { return true; } return false; }
/** * Get the (parent) shape that holds the given property. */ public final ShapeImpl getShapeFromProperty(Property prop) { ShapeImpl current = this; while (current != getRoot()) { if (current.getTransitionFromParent() instanceof AddPropertyTransition && ((AddPropertyTransition) current.getTransitionFromParent()).getProperty().equals(prop)) { return current; } current = current.parent; } return null; }
/** * Get the (parent) shape that holds the given property. * * @since 0.17 or earlier */ protected static ShapeImpl getShapeFromProperty(ShapeImpl shape, Property prop) { ShapeImpl current = shape; ShapeImpl root = shape.getRoot(); while (current != root) { if (current.getTransitionFromParent() instanceof AddPropertyTransition && ((AddPropertyTransition) current.getTransitionFromParent()).getProperty().equals(prop)) { return current; } current = current.parent; } return null; } }
/** * Get the (parent) shape that holds the given property. * * @since 0.17 or earlier */ protected static ShapeImpl getShapeFromProperty(ShapeImpl shape, Property prop) { ShapeImpl current = shape; ShapeImpl root = shape.getRoot(); while (current != root) { if (current.getTransitionFromParent() instanceof AddPropertyTransition && ((AddPropertyTransition) current.getTransitionFromParent()).getProperty().equals(prop)) { return current; } current = current.parent; } return null; } }
/** * Get the (parent) shape that holds the given property. */ public final ShapeImpl getShapeFromProperty(Object propertyName) { ShapeImpl current = this; while (current != getRoot()) { if (current.getTransitionFromParent() instanceof AddPropertyTransition && ((AddPropertyTransition) current.getTransitionFromParent()).getProperty().getKey().equals(propertyName)) { return current; } current = current.getParent(); } return null; }
/** * Get the (parent) shape that holds the given property. * * @since 0.17 or earlier */ protected static ShapeImpl getShapeFromProperty(ShapeImpl shape, Object propertyName) { ShapeImpl current = shape; ShapeImpl root = shape.getRoot(); while (current != root) { if (current.getTransitionFromParent() instanceof AddPropertyTransition && ((AddPropertyTransition) current.getTransitionFromParent()).getProperty().getKey().equals(propertyName)) { return current; } current = current.getParent(); } return null; }
/** * Get the (parent) shape that holds the given property. * * @since 0.17 or earlier */ protected static ShapeImpl getShapeFromProperty(ShapeImpl shape, Object propertyName) { ShapeImpl current = shape; ShapeImpl root = shape.getRoot(); while (current != root) { if (current.getTransitionFromParent() instanceof AddPropertyTransition && ((AddPropertyTransition) current.getTransitionFromParent()).getProperty().getKey().equals(propertyName)) { return current; } current = current.getParent(); } return null; }
List<Transition> transitionList = new ArrayList<>(); boolean found = false; while (top != getRoot() && !found) { Transition transition = top.getTransitionFromParent(); transitionList.add(transition);
this.objectType = Objects.requireNonNull(objectType); this.propertyMap = Objects.requireNonNull(propertyMap); this.root = parent != null ? parent.getRoot() : this; this.parent = parent;
this.objectType = Objects.requireNonNull(objectType); this.propertyMap = Objects.requireNonNull(propertyMap); this.root = parent != null ? parent.getRoot() : this; this.parent = parent;
this.objectType = Objects.requireNonNull(objectType); this.propertyMap = Objects.requireNonNull(propertyMap); this.root = parent != null ? parent.getRoot() : this; this.parent = parent; this.transitionFromParent = transitionFromParent;