001    package org.bukkit.material;
002    
003    import org.bukkit.Material;
004    
005    /**
006     * Represents redstone wire
007     */
008    public class RedstoneWire extends MaterialData implements Redstone {
009        public RedstoneWire() {
010            super(Material.REDSTONE_WIRE);
011        }
012    
013        /**
014         *
015         * @deprecated Magic value
016         */
017        @Deprecated
018        public RedstoneWire(final int type) {
019            super(type);
020        }
021    
022        public RedstoneWire(final Material type) {
023            super(type);
024        }
025    
026        /**
027         *
028         * @deprecated Magic value
029         */
030        @Deprecated
031        public RedstoneWire(final int type, final byte data) {
032            super(type, data);
033        }
034    
035        /**
036         *
037         * @deprecated Magic value
038         */
039        @Deprecated
040        public RedstoneWire(final Material type, final byte data) {
041            super(type, data);
042        }
043    
044        /**
045         * Gets the current state of this Material, indicating if it's powered or
046         * unpowered
047         *
048         * @return true if powered, otherwise false
049         */
050        public boolean isPowered() {
051            return getData() > 0;
052        }
053    
054        @Override
055        public String toString() {
056            return super.toString() + " " + (isPowered() ? "" : "NOT ") + "POWERED";
057        }
058    
059        @Override
060        public RedstoneWire clone() {
061            return (RedstoneWire) super.clone();
062        }
063    }