pl.slawas.helpers
Enum PrimitiveType

java.lang.Object
  extended by java.lang.Enum<PrimitiveType>
      extended by pl.slawas.helpers.PrimitiveType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<PrimitiveType>

public enum PrimitiveType
extends java.lang.Enum<PrimitiveType>

PrimitiveType - klasa wspierajaca operacje na typach prymitywnych.

Version:
$Revision: 1.1 $
Author:
Slawomir Cichy <slawas@slawas.pl>

Enum Constant Summary
BOOLEAN
           
BYTE
           
CHAR
           
DOUBLE
           
FLOAT
           
INT
           
LONG
           
SHORT
           
 
Method Summary
 java.lang.Object copyOf(java.lang.Object sourceArray)
          Metoda do kopiowania macierzy z prymitywnymi typami
 java.lang.Object createArray(int arrayLen)
           
static PrimitiveType get(java.lang.String typeName)
          Pobieranie obiektu enum na podstawie jego nazwy typu prymitywnego
static java.lang.Class<?> getPrimitiveClass(java.lang.Object obj)
           
static boolean isPrimitiveType(java.lang.String typeName)
          Sprawdzenie czy typ o podanej nazwie jest typem prostym
 java.util.Hashtable<java.lang.Object,java.lang.Object> primitiveArray2Hashtable(java.lang.Object array)
          Metoda zmieniająca tablice prymitywnych typow (array) do hashtable.
 void set(java.lang.Object sourceArray, int indx, java.lang.String value)
           
 java.lang.Object setFromString(java.lang.String value)
           
static PrimitiveType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static PrimitiveType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

INT

public static final PrimitiveType INT

BOOLEAN

public static final PrimitiveType BOOLEAN

BYTE

public static final PrimitiveType BYTE

CHAR

public static final PrimitiveType CHAR

DOUBLE

public static final PrimitiveType DOUBLE

FLOAT

public static final PrimitiveType FLOAT

LONG

public static final PrimitiveType LONG

SHORT

public static final PrimitiveType SHORT
Method Detail

values

public static PrimitiveType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (PrimitiveType c : PrimitiveType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static PrimitiveType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

get

public static PrimitiveType get(java.lang.String typeName)
Pobieranie obiektu enum na podstawie jego nazwy typu prymitywnego

Parameters:
typeName - nazwa typu
Returns:
obiekt PrimitiveType

isPrimitiveType

public static boolean isPrimitiveType(java.lang.String typeName)
Sprawdzenie czy typ o podanej nazwie jest typem prostym

Parameters:
typeName - nazwa typu
Returns:
[true|false]

primitiveArray2Hashtable

public java.util.Hashtable<java.lang.Object,java.lang.Object> primitiveArray2Hashtable(java.lang.Object array)
Metoda zmieniająca tablice prymitywnych typow (array) do hashtable. Metoda niezbedna do poprawnego zamienienia tablic do właściwości.

Parameters:
array -
Returns:
tablica z zamienionymi typami prymitywnymi do obiektow

copyOf

public java.lang.Object copyOf(java.lang.Object sourceArray)
Metoda do kopiowania macierzy z prymitywnymi typami

Parameters:
sourceArray - macierz zrodlowa
Returns:
skopiowana nowa macierz

createArray

public java.lang.Object createArray(int arrayLen)

set

public void set(java.lang.Object sourceArray,
                int indx,
                java.lang.String value)

setFromString

public java.lang.Object setFromString(java.lang.String value)

getPrimitiveClass

public static java.lang.Class<?> getPrimitiveClass(java.lang.Object obj)


Copyright © 2014 Sci Software. All Rights Reserved.