@Test public void getDefinedPropertyNamesArray_OnIntactSheet() { ElementStyleSheet sheet = new ElementStyleSheet(); assertEquals( "Non-changed sheet should return empty array of defined properties", 0, sheet.getDefinedPropertyNamesArray().length ); }
public StyleKey[] getDefinedPropertyNamesArray() { if ( source == null ) { return ElementStyleSheet.EMPTY_KEYS; } final StyleKey[] retval = propertyKeys.toArray( new StyleKey[ propertyKeys.size() ] ); for ( int i = 0, len = retval.length; i < len; i++ ) { if ( getFlag( i ) != SOURCE_DIRECT ) { retval[ i ] = null; } } return retval; }
ElementStyleSheet extends AbstractStyleSheet implements Serializable, Cloneable { public StyleKey[] getDefinedPropertyNamesArray() { if ( source == null ) { return ElementStyleSheet.EMPTY_KEYS; } final StyleKey[] retval = propertyKeys.toArray( new StyleKey[ propertyKeys.size() ] ); for ( int i = 0, len = retval.length; i < len; i++ ) { if ( getFlag( i ) != SOURCE_DIRECT ) { retval[ i ] = null; } } return retval; } }
ElementStyleSheet extends AbstractStyleSheet implements Serializable, Cloneable { public StyleKey[] getDefinedPropertyNamesArray() { if ( source == null ) { return ElementStyleSheet.EMPTY_KEYS; } final StyleKey[] retval = propertyKeys.toArray( new StyleKey[ propertyKeys.size() ] ); for ( int i = 0, len = retval.length; i < len; i++ ) { if ( getFlag( i ) != SOURCE_DIRECT ) { retval[ i ] = null; } } return retval; } ElementStyleSheet(); }
ElementStyleSheet extends AbstractStyleSheet implements Serializable, Cloneable { public StyleKey[] getDefinedPropertyNamesArray() { if ( source == null ) { return ElementStyleSheet.EMPTY_KEYS; } final StyleKey[] retval = propertyKeys.toArray( new StyleKey[ propertyKeys.size() ] ); for ( int i = 0, len = retval.length; i < len; i++ ) { if ( getFlag( i ) != SOURCE_DIRECT ) { retval[ i ] = null; } } return retval; } ElementStyleSheet(); long getChangeTracker(); boolean isLocalKey( final StyleKey key ); final Object[] toArray(); Object getStyleProperty( final StyleKey key, final Object defaultValue ); void setBooleanStyleProperty( final StyleKey key, final boolean value ); void setStyleProperty( final StyleKey key, final Object value ); ElementStyleSheet clone(); ElementStyleSheet derive( final boolean preserveId ); StyleKey[] getDefinedPropertyNamesArray(); void addListener( final StyleChangeListener l ); void removeListener( final StyleChangeListener l ); StyleKey[] getPropertyKeys(); List<StyleKey> getPropertyKeyList(); void addAll( final ElementStyleSheet sourceStyleSheet ); void addInherited( final ElementStyleSheet sourceStyleSheet ); void addInherited( final SimpleStyleSheet sourceStyleSheet ); void addDefault( final ElementStyleSheet sourceStyleSheet ); void clear(); long getModificationCount(); long getChangeTrackerHash(); void copyFrom( final ElementStyleSheet style ); }
ElementStyleSheet extends AbstractStyleSheet implements Serializable, Cloneable { public StyleKey[] getDefinedPropertyNamesArray() { if ( source == null ) { return ElementStyleSheet.EMPTY_KEYS; } final StyleKey[] retval = propertyKeys.toArray( new StyleKey[ propertyKeys.size() ] ); for ( int i = 0, len = retval.length; i < len; i++ ) { if ( getFlag( i ) != SOURCE_DIRECT ) { retval[ i ] = null; } } return retval; } ElementStyleSheet(); long getChangeTracker(); boolean isLocalKey( final StyleKey key ); final Object[] toArray(); Object getStyleProperty( final StyleKey key, final Object defaultValue ); void setBooleanStyleProperty( final StyleKey key, final boolean value ); void setStyleProperty( final StyleKey key, final Object value ); ElementStyleSheet clone(); ElementStyleSheet derive( final boolean preserveId ); StyleKey[] getDefinedPropertyNamesArray(); void addListener( final StyleChangeListener l ); void removeListener( final StyleChangeListener l ); StyleKey[] getPropertyKeys(); List<StyleKey> getPropertyKeyList(); void addAll( final ElementStyleSheet sourceStyleSheet ); void addInherited( final ElementStyleSheet sourceStyleSheet ); void addInherited( final SimpleStyleSheet sourceStyleSheet ); void addDefault( final ElementStyleSheet sourceStyleSheet ); void clear(); long getModificationCount(); long getChangeTrackerHash(); void copyFrom( final ElementStyleSheet style );  }