cCollection.java

import java.util.Collections;
import java.util.LinkedList;

public class cCollection {
	public LinkedList<Object> collectionContainer = new LinkedList<Object>();
	
	public cCollection(){
		this.collectionContainer=new LinkedList<Object>();
	}
	
	public cCollection(Object[] args){
		for (int i=0; i< args.length; i++){
			this.collectionContainer.add(args[i]);
		}
	}
	public cCollection(int low, int high){
		for (int i=low; i<high; i++){
			this.collectionContainer.add(i);
		}
	}
	
	//append(x) - Adds x to the end of the collection.
	public void append(Object x) {
		this.collectionContainer.add(x);
	}
	
	//push(x) -- Adds x to the head of the collection.
	public void push(Object x) {
		this.collectionContainer.push(x);
	}
	
	//pop() - Removes the first element of the collection and returns it. 
	public Object pop() {
		return this.collectionContainer.poll();
	}
	
	//peek() -- Returns but does not remove the first element of the collection
	public Object peek() {
		return this.collectionContainer.peek();
	}
	
	//popLast() -- Removes and returns the last element of the collection.
	public Object popLast() {
		return this.collectionContainer.pollLast();
	}
	
	//size() -- Returns the size of collection
	public int size(){
		return this.collectionContainer.size();
	}
	
	//get(index) -- Returns the element in collection
	public Object find(int index){
		return this.collectionContainer.get(index);
	}
	
	public void shuffle(){
		Collections.shuffle(this.collectionContainer);
	}
}

------------

cEnum.java

import java.util.HashMap;

public class cEnum {
	public HashMap<String, EnumType> enumContainer = new HashMap<String, EnumType>();

	public void add(String p, String id){
		EnumType enumType = new EnumType(this.enumContainer.size()+1, id);
		this.enumContainer.put(p, enumType);
	}

	public EnumType find(String k){
		return this.enumContainer.get(k);
	}
}

------------

cFunction.java

public interface cFunction {
	Object function();
}

------------

cInput.java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class cInput {
	public int cInputInt(){
		int result = 0;
		boolean valid = false;
		
		InputStreamReader isReader=new InputStreamReader(System.in);
		String input = "";
		try {
			while(!valid){
			
				input=new BufferedReader(isReader).readLine();
				try{
					result=Integer.parseInt(input);
					valid=true;
				}catch(NumberFormatException e){
					System.out.print("Invalid input, please try again!\n");
				}
			}
		} catch (IOException e) {

		}
		
		return result;
	}
			
	public float cInputFloat(){
		float result = 0;
		boolean valid = false;
		
		InputStreamReader isReader=new InputStreamReader(System.in);
		String input = "";
		try {
			while(!valid){
				input=new BufferedReader(isReader).readLine();
				try{
					result=Float.parseFloat(input);
					valid=true;
				}catch(NumberFormatException e){
					System.out.print("Invalid input, please try again!\n");
				}
			}
		} catch (IOException e) {

		}
		return result;
	}
	
	public String cInputString(){
		String result="";
	
		InputStreamReader isReader=new InputStreamReader(System.in);
		try {
			result=new BufferedReader(isReader).readLine();
		} catch (IOException e) {

		}
		return result;
	}
	
	public boolean cInputBool(){
		boolean result = false;
		boolean valid = false;

		InputStreamReader isReader=new InputStreamReader(System.in);
		String input = "";
		try {
			while(!valid){
				input=new BufferedReader(isReader).readLine();
				if(input.equals("true")||input.equals("false")){
					result = Boolean.parseBoolean(input);
					valid = true;
				}
				else{
					System.out.print("Invalid input, please try again!\n");
				}
			}
		} catch (IOException e) {

		}
		return result;
	}
}

------------

cStruct.java

import java.util.HashMap;

public class cStruct {
	public HashMap<String, Object> propertyContainer = new HashMap<String,Object>();
	public HashMap<String, cFunction> functionContainer = new HashMap<String,cFunction>();
	
	public void addProperty(String name, Object value){
		this.propertyContainer.put(name, value);
	}
	
	public Object findProperty(String name){
		return this.propertyContainer.get(name);
	}

}

------------

EnumType.java

public class EnumType {
	public int enumValue;
	public String enumIdentifier;
	
	
	public EnumType(int value, String id) {
		// TODO Auto-generated constructor stub
		this.enumValue = value;
		this.enumIdentifier = id;
	}
}
