Class ConstantSet

  • All Implemented Interfaces:
    java.lang.Iterable<Constant>, java.util.Collection<Constant>, java.util.Set<Constant>

    @Deprecated
    public class ConstantSet
    extends java.util.AbstractSet<Constant>
    Deprecated.
    Provides forward and reverse lookup for platform constants
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private ConstantSet constants
      Deprecated.
       
      private static java.util.concurrent.ConcurrentMap<java.lang.String,​ConstantSet> constantSets
      Deprecated.
       
      private static java.lang.Object lock
      Deprecated.
       
      private java.util.concurrent.ConcurrentMap<java.lang.String,​Constant> nameToConstant
      Deprecated.
       
      private java.util.concurrent.ConcurrentMap<java.lang.Integer,​Constant> valueToConstant
      Deprecated.
       
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private ConstantSet​(ConstantSet constants)
      Deprecated.
      Creates a new instance of ConstantSet
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      boolean contains​(java.lang.Object o)
      Deprecated.
       
      Constant getConstant​(int value)
      Deprecated.
      Gets the constant for a name.
      Constant getConstant​(java.lang.String name)
      Deprecated.
      Gets the constant for a name.
      static ConstantSet getConstantSet​(java.lang.String name)
      Deprecated.
      Gets a ConstantSet
      java.lang.String getName​(int value)
      Deprecated.
      Gets the name of a platform constant value.
      int getValue​(java.lang.String name)
      Deprecated.
      Gets the integer value of a platform constant.
      java.util.Iterator<Constant> iterator()
      Deprecated.
       
      static void main​(java.lang.String[] args)
      Deprecated.
       
      long maxValue()
      Deprecated.
       
      long minValue()
      Deprecated.
       
      int size()
      Deprecated.
       
      • Methods inherited from class java.util.AbstractSet

        equals, hashCode, removeAll
      • Methods inherited from class java.util.AbstractCollection

        add, addAll, clear, containsAll, isEmpty, remove, retainAll, toArray, toArray, toString
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Collection

        parallelStream, removeIf, stream, toArray
      • Methods inherited from interface java.lang.Iterable

        forEach
      • Methods inherited from interface java.util.Set

        add, addAll, clear, containsAll, isEmpty, remove, retainAll, spliterator, toArray, toArray
    • Field Detail

      • nameToConstant

        private final java.util.concurrent.ConcurrentMap<java.lang.String,​Constant> nameToConstant
        Deprecated.
      • valueToConstant

        private final java.util.concurrent.ConcurrentMap<java.lang.Integer,​Constant> valueToConstant
        Deprecated.
      • constants

        private final ConstantSet constants
        Deprecated.
      • constantSets

        private static final java.util.concurrent.ConcurrentMap<java.lang.String,​ConstantSet> constantSets
        Deprecated.
      • lock

        private static final java.lang.Object lock
        Deprecated.
    • Constructor Detail

      • ConstantSet

        private ConstantSet​(ConstantSet constants)
        Deprecated.
        Creates a new instance of ConstantSet
        Parameters:
        constants - The JNR constants to lookup real values in
    • Method Detail

      • getConstantSet

        public static ConstantSet getConstantSet​(java.lang.String name)
        Deprecated.
        Gets a ConstantSet
        Parameters:
        name - The name of the constant set to get.
        Returns:
        A ConstantSet.
      • getConstant

        public Constant getConstant​(java.lang.String name)
        Deprecated.
        Gets the constant for a name.
        Parameters:
        name - The name of the system constant (e.g. "EINVAL").
        Returns:
        A Constant instance.
      • getConstant

        public Constant getConstant​(int value)
        Deprecated.
        Gets the constant for a name.
        Parameters:
        value - The name of the system constant (e.g. "EINVAL").
        Returns:
        A Constant instance.
      • getValue

        public int getValue​(java.lang.String name)
        Deprecated.
        Gets the integer value of a platform constant.
        Parameters:
        name - The name of the platform constant to look up (e.g. "EINVAL").
        Returns:
        The integer value of the constant.
      • getName

        public java.lang.String getName​(int value)
        Deprecated.
        Gets the name of a platform constant value.
        Parameters:
        value - The integer value to look up.
        Returns:
        The name of the constant.
      • minValue

        public long minValue()
        Deprecated.
      • maxValue

        public long maxValue()
        Deprecated.
      • iterator

        public java.util.Iterator<Constant> iterator()
        Deprecated.
        Specified by:
        iterator in interface java.util.Collection<Constant>
        Specified by:
        iterator in interface java.lang.Iterable<Constant>
        Specified by:
        iterator in interface java.util.Set<Constant>
        Specified by:
        iterator in class java.util.AbstractCollection<Constant>
      • size

        public int size()
        Deprecated.
        Specified by:
        size in interface java.util.Collection<Constant>
        Specified by:
        size in interface java.util.Set<Constant>
        Specified by:
        size in class java.util.AbstractCollection<Constant>
      • contains

        public boolean contains​(java.lang.Object o)
        Deprecated.
        Specified by:
        contains in interface java.util.Collection<Constant>
        Specified by:
        contains in interface java.util.Set<Constant>
        Overrides:
        contains in class java.util.AbstractCollection<Constant>
      • main

        public static void main​(java.lang.String[] args)
        Deprecated.