@Override public int size() { return PropertyMap.this.size(); } };
@Override public int size() { return PropertyMap.this.size(); } };
@Override public int size() { return PropertyMap.this.size(); } };
public boolean isEmpty() { return size() == 0; }
/** * Returns all (also hidden) Property objects in this shape. * * @param ascending desired order * @since 0.17 or earlier */ @TruffleBoundary @Override public final List<Property> getPropertyListInternal(boolean ascending) { Property[] props = new Property[this.propertyMap.size()]; int i = ascending ? props.length : 0; for (Iterator<Property> it = this.propertyMap.reverseOrderedValueIterator(); it.hasNext();) { Property current = it.next(); if (ascending) { props[--i] = current; } else { props[i++] = current; } } return Arrays.asList(props); }
/** * Returns all (also hidden) Property objects in this shape. * * @param ascending desired order * @since 0.17 or earlier */ @TruffleBoundary @Override public final List<Property> getPropertyListInternal(boolean ascending) { Property[] props = new Property[this.propertyMap.size()]; int i = ascending ? props.length : 0; for (Iterator<Property> it = this.propertyMap.reverseOrderedValueIterator(); it.hasNext();) { Property current = it.next(); if (ascending) { props[--i] = current; } else { props[i++] = current; } } return Arrays.asList(props); }
private static Property[] makePropertiesList(ShapeImpl parent, PropertyMap propertyMap) { Property[] properties = parent.propertyArray; if (properties != null && propertyMap.size() != parent.propertyMap.size()) { Property lastProperty = propertyMap.getLastProperty(); if (lastProperty != null && !lastProperty.isHidden()) { propertyListAllocCount.inc(); if (!lastProperty.isShadow()) { properties = Arrays.copyOf(properties, properties.length + 1); properties[properties.length - 1] = lastProperty; } else { properties = Arrays.copyOf(properties, properties.length); for (int i = 0; i < properties.length; i++) { if (properties[i].isSame(lastProperty)) { properties[i] = lastProperty; } } } } else { propertyListShareCount.inc(); } } return properties; }