org.jruby.util
Enum KCode
java.lang.Object
java.lang.Enum<KCode>
org.jruby.util.KCode
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable<KCode>
public enum KCode
- extends java.lang.Enum<KCode>
Methods inherited from class java.lang.Enum |
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
NIL
public static final KCode NIL
NONE
public static final KCode NONE
UTF8
public static final KCode UTF8
SJIS
public static final KCode SJIS
EUC
public static final KCode EUC
values
public static KCode[] 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 (KCode c : KCode.values())
System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in
the order they are declared
valueOf
public static KCode 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
create
public static KCode create(Ruby runtime,
java.lang.String lang)
kcode
public IRubyObject kcode(Ruby runtime)
getKCode
public java.lang.String getKCode()
bits
public int bits()
fromBits
public static KCode fromBits(int bits)
getEncoding
public org.jcodings.Encoding getEncoding()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Enum<KCode>
Copyright © 2002-2009 JRuby Team. All Rights Reserved.