@Test public void toArray_OnIntactSheet() { ElementStyleSheet sheet = new ElementStyleSheet(); Object[] objects = sheet.toArray(); for ( Object object : objects ) { assertNull( object ); } }
public final Object[] toArray() { final List<StyleKey> keys = propertyKeys; final int size = keys.size(); final Object[] data = new Object[ size ]; if ( source == null ) { source = new byte[ ( size + 3 ) >> 2 ]; properties = new Object[ size ]; } for ( int i = 0; i < size; i++ ) { final StyleKey key = keys.get( i ); if ( key == null ) { throw new NullPointerException(); } final int identifier = key.identifier; final byte sourceHint = getFlag( identifier ); if ( sourceHint == SOURCE_UNDEFINED ) { data[ identifier ] = getStyleProperty( key ); } else { data[ identifier ] = properties[ identifier ]; } } return data; }
ElementStyleSheet extends AbstractStyleSheet implements Serializable, Cloneable { public final Object[] toArray() { final List<StyleKey> keys = propertyKeys; final int size = keys.size(); final Object[] data = new Object[ size ]; if ( source == null ) { source = new byte[ ( size + 3 ) >> 2 ]; properties = new Object[ size ]; } for ( int i = 0; i < size; i++ ) { final StyleKey key = keys.get( i ); if ( key == null ) { throw new NullPointerException(); } final int identifier = key.identifier; final byte sourceHint = getFlag( identifier ); if ( sourceHint == SOURCE_UNDEFINED ) { data[ identifier ] = getStyleProperty( key ); } else { data[ identifier ] = properties[ identifier ]; } } return data; } }
ElementStyleSheet extends AbstractStyleSheet implements Serializable, Cloneable { public final Object[] toArray() { final List<StyleKey> keys = propertyKeys; final int size = keys.size(); final Object[] data = new Object[ size ]; if ( source == null ) { source = new byte[ ( size + 3 ) >> 2 ]; properties = new Object[ size ]; } for ( int i = 0; i < size; i++ ) { final StyleKey key = keys.get( i ); if ( key == null ) { throw new NullPointerException(); } final int identifier = key.identifier; final byte sourceHint = getFlag( identifier ); if ( sourceHint == SOURCE_UNDEFINED ) { data[ identifier ] = getStyleProperty( key ); } else { data[ identifier ] = properties[ identifier ]; } } return data; } ElementStyleSheet(); }
ElementStyleSheet extends AbstractStyleSheet implements Serializable, Cloneable { public final Object[] toArray() { final List<StyleKey> keys = propertyKeys; final int size = keys.size(); final Object[] data = new Object[ size ]; if ( source == null ) { source = new byte[ ( size + 3 ) >> 2 ]; properties = new Object[ size ]; } for ( int i = 0; i < size; i++ ) { final StyleKey key = keys.get( i ); if ( key == null ) { throw new NullPointerException(); } final int identifier = key.identifier; final byte sourceHint = getFlag( identifier ); if ( sourceHint == SOURCE_UNDEFINED ) { data[ identifier ] = getStyleProperty( key ); } else { data[ identifier ] = properties[ identifier ]; } } return data; } 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 final Object[] toArray() { final List<StyleKey> keys = propertyKeys; final int size = keys.size(); final Object[] data = new Object[ size ]; if ( source == null ) { source = new byte[ ( size + 3 ) >> 2 ]; properties = new Object[ size ]; } for ( int i = 0; i < size; i++ ) { final StyleKey key = keys.get( i ); if ( key == null ) { throw new NullPointerException(); } final int identifier = key.identifier; final byte sourceHint = getFlag( identifier ); if ( sourceHint == SOURCE_UNDEFINED ) { data[ identifier ] = getStyleProperty( key ); } else { data[ identifier ] = properties[ identifier ]; } } return data; } 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 );  }