diff options
Diffstat (limited to 'src/Java/gtPlusPlus/core/util/array')
-rw-r--r-- | src/Java/gtPlusPlus/core/util/array/AutoMap.java | 77 | ||||
-rw-r--r-- | src/Java/gtPlusPlus/core/util/array/BlockPos.java | 28 | ||||
-rw-r--r-- | src/Java/gtPlusPlus/core/util/array/Pair.java | 27 | ||||
-rw-r--r-- | src/Java/gtPlusPlus/core/util/array/Quad.java | 33 | ||||
-rw-r--r-- | src/Java/gtPlusPlus/core/util/array/Triplet.java | 27 |
5 files changed, 0 insertions, 192 deletions
diff --git a/src/Java/gtPlusPlus/core/util/array/AutoMap.java b/src/Java/gtPlusPlus/core/util/array/AutoMap.java deleted file mode 100644 index ea5e1dd25e..0000000000 --- a/src/Java/gtPlusPlus/core/util/array/AutoMap.java +++ /dev/null @@ -1,77 +0,0 @@ -package gtPlusPlus.core.util.array; - -import java.io.Serializable; -import java.util.*; - -public class AutoMap<V> implements Iterable<V>, Cloneable, Serializable { - - /** - * The Internal Map - */ - private Map<Integer, V> mInternalMap = new HashMap<Integer, V>(); - - /** - * The Internal ID - */ - private int mInternalID = 0; - private static final long serialVersionUID = 3771412318075131790L; - - @Override - public Iterator<V> iterator() { - return values().iterator(); - } - - public synchronized boolean setValue(V object){ - int mOriginalID = this.mInternalID; - put(object); - if (this.mInternalMap.get(mOriginalID).equals(object) || mOriginalID > this.mInternalID){ - return true; - } - else { - return false; - } - } - - public synchronized V put(V object){ - return set(object); - } - - public synchronized V set(V object){ - return mInternalMap.put(mInternalID++, object); - } - - public synchronized V get(int id){ - return mInternalMap.get(id); - } - - public synchronized Collection<V> values(){ - return mInternalMap.values(); - } - - public synchronized int size(){ - return mInternalMap.size(); - } - - public synchronized int hashcode(){ - return mInternalMap.hashCode(); - } - - public synchronized boolean containsKey(int key){ - return mInternalMap.containsKey(key); - } - - public synchronized boolean containsValue(V value){ - return mInternalMap.containsValue(value); - } - - public synchronized boolean isEmpty(){ - return mInternalMap.isEmpty(); - } - - public synchronized boolean clear(){ - this.mInternalID = 0; - this.mInternalMap.clear(); - return true; - } - -} diff --git a/src/Java/gtPlusPlus/core/util/array/BlockPos.java b/src/Java/gtPlusPlus/core/util/array/BlockPos.java deleted file mode 100644 index fbf7676627..0000000000 --- a/src/Java/gtPlusPlus/core/util/array/BlockPos.java +++ /dev/null @@ -1,28 +0,0 @@ -package gtPlusPlus.core.util.array; - -import java.io.Serializable; - -public class BlockPos implements Serializable{ - - private static final long serialVersionUID = -7271947491316682006L; - public final int xPos; - public final int yPos; - public final int zPos; - public final int dim; - - public BlockPos(int x, int y, int z){ - this(x, y, z, 0); - } - - public BlockPos(int x, int y, int z, int dim){ - this.xPos = x; - this.yPos = y; - this.zPos = z; - this.dim = dim; - } - - public String getLocationString() { - return "[X: "+this.xPos+"][Y: "+this.yPos+"][Z: "+this.zPos+"]"; - } - -} diff --git a/src/Java/gtPlusPlus/core/util/array/Pair.java b/src/Java/gtPlusPlus/core/util/array/Pair.java deleted file mode 100644 index 1d2c0ef7cb..0000000000 --- a/src/Java/gtPlusPlus/core/util/array/Pair.java +++ /dev/null @@ -1,27 +0,0 @@ -package gtPlusPlus.core.util.array; - -import java.io.Serializable; - -public class Pair<K,V> implements Serializable { - - /** - * SVUID - */ - private static final long serialVersionUID = 1250550491092812443L; - private final K key; - private final V value; - - public Pair(final K key, final V value){ - this.key = key; - this.value = value; - } - - final public K getKey(){ - return this.key; - } - - final public V getValue(){ - return this.value; - } - -}
\ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/util/array/Quad.java b/src/Java/gtPlusPlus/core/util/array/Quad.java deleted file mode 100644 index 417c3b6ebc..0000000000 --- a/src/Java/gtPlusPlus/core/util/array/Quad.java +++ /dev/null @@ -1,33 +0,0 @@ -package gtPlusPlus.core.util.array; - -public class Quad<K,V,C,R> { - - private final K key; - private final V value; - private final C value2; - private final R value3; - - public Quad(final K key, final V value, final C value2, final R value3){ - this.key = key; - this.value = value; - this.value2 = value2; - this.value3 = value3; - } - - final public K getKey(){ - return this.key; - } - - final public V getValue_1(){ - return this.value; - } - - final public C getValue_2(){ - return this.value2; - } - - final public R getValue_3(){ - return this.value3; - } - -}
\ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/util/array/Triplet.java b/src/Java/gtPlusPlus/core/util/array/Triplet.java deleted file mode 100644 index 01f836ae72..0000000000 --- a/src/Java/gtPlusPlus/core/util/array/Triplet.java +++ /dev/null @@ -1,27 +0,0 @@ -package gtPlusPlus.core.util.array; - -public class Triplet<K,V,C> { - - private final K key; - private final V value; - private final C count; - - public Triplet(final K key, final V value, final C value2){ - this.key = key; - this.value = value; - this.count = value2; - } - - final public K getValue_1(){ - return this.key; - } - - final public V getValue_2(){ - return this.value; - } - - final public C getValue_3(){ - return this.count; - } - -}
\ No newline at end of file |