public V get( byte key ) { synchronized( mutex ) { return m.get( key ); } }
/** * Retrieves the value for <tt>key</tt> * * @param key an <code>Object</code> value * @return the value of <tt>key</tt> or null if no such mapping exists. */ public V get( Object key ) { byte k; if ( key != null ) { if ( key instanceof Byte ) { k = unwrapKey( ( Byte ) key ); } else { return null; } } else { k = _map.getNoEntryKey(); } return _map.get( k ); }
public V get( byte key) { return m.get( key ); }
/** * Retrieves the value for <tt>key</tt> * * @param key an <code>Object</code> value * @return the value of <tt>key</tt> or null if no such mapping exists. */ public V get( Object key ) { byte k; if ( key != null ) { if ( key instanceof Byte ) { k = unwrapKey( ( Byte ) key ); } else { return null; } } else { k = _map.getNoEntryKey(); } return _map.get( k ); }
/** * @return A block from the family for a given URI */ @Override public Block getBlockFor(BlockUri blockUri) { if (getURI().equals(blockUri.getFamilyUri())) { try { byte connections = Byte.parseByte(blockUri.getIdentifier().toString().toLowerCase(Locale.ENGLISH)); return blocks.get(connections); } catch (IllegalArgumentException e) { logger.error("can't find block with URI: {}", blockUri, e); return null; } } return null; }
/** * Retrieves the value for <tt>key</tt> * * @param key an <code>Object</code> value * @return the value of <tt>key</tt> or null if no such mapping exists. */ public V get( Object key ) { byte k; if ( key != null ) { if ( key instanceof Byte ) { k = unwrapKey( ( Byte ) key ); } else { return null; } } else { k = _map.getNoEntryKey(); } return _map.get( k ); }
/** * Update the block then a neighbor changes * * @param location The location of the block * @param oldBlock What the block was before the neighbor updated * * @return The block from the family to be placed */ @Override public Block getBlockForNeighborUpdate(Vector3i location, Block oldBlock) { byte connections = 0; for (Side connectSide : SideBitFlag.getSides(getConnectionSides())) { if (this.connectionCondition(location, connectSide)) { connections += SideBitFlag.getSide(connectSide); } } return blocks.get(connections); }
/** * Using the location of the block, the side the block is being attached to and the direction the block is being placed in, * determine what block should be placed. * * @param location The location of where the block will be placed * @param attachmentSide The side that the new block is being placed on * @param direction The direction the block is being placed in * * @return The block from the family to be placed */ @Override public Block getBlockForPlacement(Vector3i location, Side attachmentSide, Side direction) { byte connections = 0; for (Side connectSide : SideBitFlag.getSides(getConnectionSides())) { if (this.connectionCondition(location, connectSide)) { connections += SideBitFlag.getSide(connectSide); } } return blocks.get(connections); }
/** {@inheritDoc} */ public boolean equals( Object other ) { if ( ! ( other instanceof TByteObjectMap ) ) { return false; } TByteObjectMap that = ( TByteObjectMap ) other; if ( that.size() != this.size() ) { return false; } try { TByteObjectIterator iter = this.iterator(); while ( iter.hasNext() ) { iter.advance(); byte key = iter.key(); Object value = iter.value(); if ( value == null ) { if ( !( that.get( key ) == null && that.containsKey( key ) ) ) { return false; } } else { if ( !value.equals( that.get( key ) ) ) { return false; } } } } catch ( ClassCastException ex ) { // unused. } return true; }
public V get( byte key ) { synchronized( mutex ) { return m.get( key ); } }
public V get( byte key ) { synchronized( mutex ) { return m.get( key ); } }
@Override public V get( byte key ) { synchronized( mutex ) { return m.get( key ); } }
public V get( byte key) { return m.get( key ); }
public V get( byte key) { return m.get( key ); }
public Region getRegion(byte regionCode) { return regions.get(regionCode); }
public V get( byte key ) { synchronized( mutex ) { return m.get( key ); } }
public V get( byte key) { return m.get( key ); }
@Override public V get( byte key) { return m.get( key ); }
protected TextureArea[] getOverlaysForSlot(boolean isOutput, boolean isFluid, boolean isLast) { TextureArea base = isFluid ? GuiTextures.FLUID_SLOT : GuiTextures.SLOT; if(!isOutput && !isFluid && isLast && recipeBuilderSample instanceof IntCircuitRecipeBuilder) { //automatically add int circuit overlay to last item input slot return new TextureArea[]{base, GuiTextures.INT_CIRCUIT_OVERLAY}; } byte overlayKey = (byte) ((isOutput ? 2 : 0) + (isFluid ? 1 : 0) + (isLast ? 4 : 0)); if(slotOverlays.containsKey(overlayKey)) { return new TextureArea[] {base, slotOverlays.get(overlayKey)}; } return new TextureArea[] {base}; }
/** * Retrieves the value for <tt>key</tt> * * @param key an <code>Object</code> value * @return the value of <tt>key</tt> or null if no such mapping exists. */ @Override public V get( Object key ) { if ( key instanceof Byte ) { byte k = unwrapKey( ( Byte ) key ); return _map.get( k ); } return null; }