Package java.util

Examples of java.util.EnumSet$SerializationProxy


        serializer.write(kryo, output, element);
    }

    public EnumSet read (Kryo kryo, Input input, Class<EnumSet> type) {
      Registration registration = kryo.readClass(input);
      EnumSet object = EnumSet.noneOf(registration.getType());
      Serializer serializer = registration.getSerializer();
      int length = input.readInt(true);
      for (int i = 0; i < length; i++)
        object.add(serializer.read(kryo, input, null));
      return object;
    }
View Full Code Here


            return null;
        }

        final List values = new ArrayList();

        final EnumSet s = (EnumSet) value;
        final Object[] array = s.toArray();
        for (final Object anArray : array) {
            values.add(ec.encode(anArray));
        }

        return values;
View Full Code Here

    }

    @Override
    @SuppressWarnings("unchecked")
    public Set fromNative(Integer nativeValue, FromNativeContext context) {
        EnumSet enums = EnumSet.noneOf(enumClass);
        for (Enum e : allValues) {
            int enumValue = enumMapper.intValue(e);
            if ((nativeValue & enumValue) == enumValue) {
                enums.add(e);
            }
        }

        return enums;
    }
View Full Code Here

TOP

Related Classes of java.util.EnumSet$SerializationProxy

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.