Package utils

Examples of utils.Receivable


    private String name;

    public JavaSprite( String name ) {
        mImage = GraphicsDB.retrieveGraphic( name, BufferedImage.class );
        if ( mImage == null ) {
            Receivable toRegister = new Receivable() {
                @Override
                public void give( Object obj ) {
                    if ( !(obj instanceof BufferedImage) ) {
                        throw new IllegalArgumentException( "SoftwareSprite - Receivable.give: Not a BufferedImage." );
                    }
View Full Code Here


        mReceivables.add( r );
        mReceivableNames.add( name );
    }

    private static void checkReceivables( String name, Object obj ) {
        Receivable r;
        int index;
        while( ( index = mReceivableNames.indexOf( name ) ) != -1 ) {
            mReceivables.get( index ).give( obj );
            mReceivables.remove( index );
            mReceivableNames.remove( index );
View Full Code Here

TOP

Related Classes of utils.Receivable

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.